public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Steven Rostedt <rostedt@goodmis.org>
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 17:50:20 +0300	[thread overview]
Message-ID: <20220126145020.GB1978@kadam> (raw)
In-Reply-To: <20220126093918.268d0e42@gandalf.local.home>

On Wed, Jan 26, 2022 at 09:39:18AM -0500, Steven Rostedt wrote:
> > 9ec5a7d16899ed Tom Zanussi             2022-01-10  6149  static int event_hist_trigger_parse(struct event_command *cmd_ops,
> > 7ef224d1d0e3a1 Tom Zanussi             2016-03-03  6150  				    struct trace_event_file *file,
> > 7ef224d1d0e3a1 Tom Zanussi             2016-03-03  6151  				    char *glob, char *cmd, char *param)
> > 7ef224d1d0e3a1 Tom Zanussi             2016-03-03  6152  {
> > 7ef224d1d0e3a1 Tom Zanussi             2016-03-03  6153  	unsigned int hist_trigger_bits = TRACING_MAP_BITS_DEFAULT;
> > 7ef224d1d0e3a1 Tom Zanussi             2016-03-03  6154  	struct event_trigger_data *trigger_data;
> > 7ef224d1d0e3a1 Tom Zanussi             2016-03-03  6155  	struct hist_trigger_attrs *attrs;
> > 7ef224d1d0e3a1 Tom Zanussi             2016-03-03  6156  	struct event_trigger_ops *trigger_ops;
> > 7ef224d1d0e3a1 Tom Zanussi             2016-03-03  6157  	struct hist_trigger_data *hist_data;
> > 4b147936fa5096 Tom Zanussi             2018-01-15  6158  	struct synth_event *se;
> > 4b147936fa5096 Tom Zanussi             2018-01-15  6159  	const char *se_name;
> > 30350d65ac5676 Tom Zanussi             2018-01-15  6160  	bool remove = false;
> > c5eac6ee8bc5d3 Kalesh Singh            2021-10-25  6161  	char *trigger, *p, *start;
> > 7ef224d1d0e3a1 Tom Zanussi             2016-03-03  6162  	int ret = 0;
> > 7ef224d1d0e3a1 Tom Zanussi             2016-03-03  6163  
> > 0e2b81f7b52a1c Masami Hiramatsu        2018-11-05  6164  	lockdep_assert_held(&event_mutex);
> > 0e2b81f7b52a1c Masami Hiramatsu        2018-11-05  6165  
> > f404da6e1d46ce Tom Zanussi             2018-01-15 @6166  	if (glob && strlen(glob)) {
> 
> 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.

regards,
dan carpenter


  reply	other threads:[~2022-01-26 14:51 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 [this message]
2022-01-26 15:27     ` Steven Rostedt

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=20220126145020.GB1978@kadam \
    --to=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=rostedt@goodmis.org \
    --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