public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: kernel-janitors@vger.kernel.org
Subject: Re: [bug report] tracing: Factorize filter creation
Date: Mon, 26 Mar 2018 14:32:26 +0000	[thread overview]
Message-ID: <20180326143226.GK2149215@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <20180323084612.GA23928@mwanda>

On Fri, Mar 23, 2018 at 11:46:12AM +0300, Dan Carpenter wrote:
> Hello Tejun Heo,
> 
> The patch 38b78eb85540: "tracing: Factorize filter creation" from Dec
> 15, 2011, leads to the following static checker warning:
> 
> 	kernel/trace/trace_events_filter.c:1794 apply_event_filter()
> 	error: uninitialized symbol 'filter'.
> 
> kernel/trace/trace_events_filter.c
>   1764  int apply_event_filter(struct trace_event_file *file, char *filter_string)
...
>   1785  
>   1786          err = create_filter(call, filter_string, true, &filter);
>                                                                ^^^^^^^
>   1787  
>   1788          /*
>   1789           * Always swap the call filter with the new filter
>   1790           * even if there was an error. If there was an error
>   1791           * in the filter, we disable the filter and show the error
>   1792           * string
>   1793           */
>   1794          if (filter) {
>                     ^^^^^^
> I guess the fix is probably to set filter to NULL in create_filter()?

@filterp is the outparam and create_filter() always sets it, so the
code doesn't look wrong to me.

Thanks.

-- 
tejun

  parent reply	other threads:[~2018-03-26 14:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23  8:46 [bug report] tracing: Factorize filter creation Dan Carpenter
2018-03-23  8:49 ` Dan Carpenter
2018-03-26 14:32 ` Tejun Heo [this message]
2018-03-26 14:36 ` Tejun Heo
2018-03-26 16:07 ` Dan Carpenter
2018-03-26 16:35 ` Tejun Heo
2018-03-27  7:23 ` Dan Carpenter

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=20180326143226.GK2149215@devbig577.frc2.facebook.com \
    --to=tj@kernel.org \
    --cc=kernel-janitors@vger.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