From: Peter Zijlstra <peterz@infradead.org>
To: coverity-bot <keescook@chromium.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
Nathan Chancellor <natechancellor@gmail.com>,
Dmitry Golovin <dima@golovin.in>, Miroslav Benes <mbenes@suse.cz>,
Borislav Petkov <bp@suse.de>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
linux-next@vger.kernel.org
Subject: Re: Coverity: create_orc_entry(): Resource leaks
Date: Sat, 18 Apr 2020 21:36:48 +0200 [thread overview]
Message-ID: <20200418193648.GS2483@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <202004171457.E65664861F@keescook>
On Fri, Apr 17, 2020 at 02:57:37PM -0700, coverity-bot wrote:
> Hello!
>
> This is an experimental semi-automated report about issues detected by
> Coverity from a scan of next-20200417 as part of the linux-next scan project:
> https://scan.coverity.com/projects/linux-next-weekly-scan
>
> You're getting this email because you were associated with the identified
> lines of code (noted below) that were touched by commits:
>
> Wed Apr 1 13:23:27 2020 -0500
> e81e07244325 ("objtool: Support Clang non-section symbols in ORC generation")
>
> Coverity reported the following:
>
> *** CID 1492654: Resource leaks (RESOURCE_LEAK)
> /tools/objtool/orc_gen.c: 123 in create_orc_entry()
> 117 rela->sym = find_symbol_containing(insn_sec,
> 118 insn_off - 1);
> 119 }
> 120 if (!rela->sym) {
> 121 WARN("missing symbol for insn at offset 0x%lx\n",
> 122 insn_off);
> vvv CID 1492654: Resource leaks (RESOURCE_LEAK)
> vvv Variable "rela" going out of scope leaks the storage it points to.
> 123 return -1;
> 124 }
> 125
> 126 rela->addend = insn_off - rela->sym->offset;
> 127 }
> 128
>
> If this is a false positive, please let us know so we can mark it as
> such, or teach the Coverity rules to be smarter. If not, please make
> sure fixes get into linux-next. :) For patches fixing this, please
> include these lines (but double-check the "Fixes" first):
This isn't a false positive, but I don't think we care. objtool is a
run-once short lived thing. Also, in the above case, if we error we
exit, absolutely no point in spending time on freeing memory.
prev parent reply other threads:[~2020-04-18 19:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-17 21:57 Coverity: create_orc_entry(): Resource leaks coverity-bot
2020-04-18 19:36 ` Peter Zijlstra [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=20200418193648.GS2483@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bp@suse.de \
--cc=dima@golovin.in \
--cc=gustavo@embeddedor.com \
--cc=jpoimboe@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-next@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=natechancellor@gmail.com \
/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).