From: Ingo Molnar <mingo@kernel.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] objtool: Fix NULL printf() '%s' argument
Date: Wed, 26 Mar 2025 08:26:00 +0100 [thread overview]
Message-ID: <Z-OsCFQ_qUHjRVmV@gmail.com> (raw)
In-Reply-To: <20250326151014.6a006c93@canb.auug.org.au>
* Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Josh,
>
> On Tue, 25 Mar 2025 18:30:37 -0700 Josh Poimboeuf <jpoimboe@kernel.org> wrote:
> >
> > It's probably not the best idea to pass a string pointer to printf()
> > right after confirming said pointer is NULL. Fix the typo and use
> > argv[i] instead.
> >
> > Fixes: c5995abe1547 ("objtool: Improve error handling")
> > Closes: https://lore.kernel.org/20250326103854.309e3c60@canb.auug.org.au
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
> > ---
> > tools/objtool/builtin-check.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/objtool/builtin-check.c b/tools/objtool/builtin-check.c
> > index 2bdff910430e..e364ab6345d3 100644
> > --- a/tools/objtool/builtin-check.c
> > +++ b/tools/objtool/builtin-check.c
> > @@ -238,7 +238,7 @@ static void save_argv(int argc, const char **argv)
> > for (int i = 0; i < argc; i++) {
> > orig_argv[i] = strdup(argv[i]);
> > if (!orig_argv[i]) {
> > - WARN_GLIBC("strdup(%s)", orig_argv[i]);
> > + WARN_GLIBC("strdup(%s)", argv[i]);
> > exit(1);
> > }
> > };
> > --
> > 2.48.1
> >
>
> Thanks. I have applied this to the merge of the tip tree (which
> include the tip-fixes tree) in linux-next today. It fixes the build
> failure for me. I will apply it to the merge of the tip-fixes tree
> tomorrow unless it has already been applied by then.
Thanks, I've re-spun tip/urgent, so the next -next iteration ought to
pick up the fix.
Ingo
next prev parent reply other threads:[~2025-03-26 7:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-26 1:30 Josh Poimboeuf
2025-03-26 4:10 ` Stephen Rothwell
2025-03-26 7:26 ` Ingo Molnar [this message]
2025-03-26 13:13 ` Stephen Rothwell
2025-03-26 7:31 ` [tip: objtool/urgent] objtool: Fix NULL printf() '%s' argument in builtin-check.c:save_argv() tip-bot2 for Josh Poimboeuf
2025-03-27 11:06 ` tip-bot2 for Josh Poimboeuf
2025-03-28 13:48 ` tip-bot2 for Josh Poimboeuf
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=Z-OsCFQ_qUHjRVmV@gmail.com \
--to=mingo@kernel.org \
--cc=hpa@zytor.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=sfr@canb.auug.org.au \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®