Re: [bug report] tracing: Factorize filter creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux