lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170712094501.4579732f@gandalf.local.home>
Date:   Wed, 12 Jul 2017 09:45:01 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 2/2] ftrace: silence uninitialized variable warning

On Wed, 12 Jul 2017 10:35:57 +0300
Dan Carpenter <dan.carpenter@...cle.com> wrote:

> My static checker complains that if "func" is NULL then "clear_filter"
> is uninitialized.  This seems like it could be true, although it's
> possible something subtle is happening that I haven't seen.
> 
>     kernel/trace/ftrace.c:3844 match_records()
>     error: uninitialized symbol 'clear_filter'.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
> It does occur to me that I could initialize it to 1 instead of 0 but my
> guess is that zero is intended.  Please review this one carefully.

Looks like it broke with f0a3b154bd7 ("ftrace: Clarify code for mod
command"). Yeah, clear_filter = 0 is the correct default.

Thanks!

-- Steve

> 
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 2a3c45743f54..5e658da91912 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -3816,7 +3816,7 @@ match_records(struct ftrace_hash *hash, char *func, int len, char *mod)
>  	int exclude_mod = 0;
>  	int found = 0;
>  	int ret;
> -	int clear_filter;
> +	int clear_filter = 0;
>  
>  	if (func) {
>  		func_g.type = filter_parse_regex(func, len, &func_g.search,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ