From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
Muhammad Usama Anjum <musamaanjum@gmail.com>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Ingo Molnar <mingo@kernel.org>, Miroslav Benes <mbenes@suse.cz>,
Borislav Petkov <bp@suse.de>,
open list <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org, colin.king@canonical.com
Subject: Re: [PATCH] objtool: prevent memory leak in error paths
Date: Mon, 19 Apr 2021 14:15:48 -0300 [thread overview]
Message-ID: <YH26xMfn04KATRow@kernel.org> (raw)
In-Reply-To: <YHfqOVf1hGlbWjLP@hirez.programming.kicks-ass.net>
Em Thu, Apr 15, 2021 at 09:24:41AM +0200, Peter Zijlstra escreveu:
> On Wed, Apr 14, 2021 at 11:47:09AM +0300, Dan Carpenter wrote:
> > On Wed, Apr 14, 2021 at 01:45:11AM +0500, Muhammad Usama Anjum wrote:
> > > Memory allocated by sym and sym->name isn't being freed if some error
> > > occurs in elf_create_undef_symbol(). Free the sym and sym->name if error
> > > is detected before returning NULL.
> > >
> > > Addresses-Coverity: ("Prevent memory leak")
> > > Fixes: 2f2f7e47f052 ("objtool: Add elf_create_undef_symbol()")
> > > Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
> > > ---
> > > Only build has been tested.
> > >
> >
> > Just ignore leaks from the tools/ directory. These things run and then
> > exit and all the memory is freed. #OldSchoolGarbageCollector
>
> Mostly true; but I suspect tools/perf might care, it has some longer
> running things in.
Yes, and now we have 'perf daemon' that is long running.
- Arnaldo
prev parent reply other threads:[~2021-04-19 17:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 20:45 [PATCH] objtool: prevent memory leak in error paths Muhammad Usama Anjum
2021-04-14 7:21 ` Peter Zijlstra
2021-04-14 8:47 ` Dan Carpenter
2021-04-15 7:24 ` Peter Zijlstra
2021-04-19 17:15 ` Arnaldo Carvalho de Melo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YH26xMfn04KATRow@kernel.org \
--to=acme@kernel.org \
--cc=bp@suse.de \
--cc=colin.king@canonical.com \
--cc=dan.carpenter@oracle.com \
--cc=jpoimboe@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=mingo@kernel.org \
--cc=musamaanjum@gmail.com \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).