From: Steven Rostedt <rostedt@goodmis.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kbuild@lists.01.org, Tom Zanussi <zanussi@kernel.org>,
lkp@intel.com, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: Re: kernel/trace/trace_events_hist.c:6174 event_hist_trigger_parse() error: we previously assumed 'glob' could be null (see line 6166)
Date: Wed, 26 Jan 2022 10:27:02 -0500 [thread overview]
Message-ID: <20220126102702.6b896353@gandalf.local.home> (raw)
In-Reply-To: <20220126145020.GB1978@kadam>
On Wed, 26 Jan 2022 17:50:20 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > I just reviewed the code, and it looks like the logic should keep glob from
> > ever being NULL.
>
> Smatch can also figure that out, and does not warn, if you have the
> cross function DB. Unfortunately, that's not feasible for the zero day
> bot because it takes too long to build the DB.
>
> I was puzzled why this warning showed up now when the code is from 2018.
Well it is called from trigger_process_regex() that gets buf passed in, and
that gets called by trace_boot_init_histograms(),
trace_boot_init_one_event() and event_trigger_regex_write(). All of which
pass in something for that glob parameter.
But I can see it being difficult to catch all that.
I have no problem adding the WARN_ON(), just to make it cleaner.
-- Steve
prev parent reply other threads:[~2022-01-26 15:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-26 10:14 kernel/trace/trace_events_hist.c:6174 event_hist_trigger_parse() error: we previously assumed 'glob' could be null (see line 6166) Dan Carpenter
2022-01-26 14:39 ` Steven Rostedt
2022-01-26 14:50 ` Dan Carpenter
2022-01-26 15:27 ` Steven Rostedt [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=20220126102702.6b896353@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=dan.carpenter@oracle.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=zanussi@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