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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1316787794.29966.190.camel@gandalf.stny.rr.com>
Date:	Fri, 23 Sep 2011 10:23:14 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	penberg@...helsinki.fi
Cc:	linux-kernel@...r.kernel.org, Pekka Enberg <penberg@...nel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH 1/2] tracing: Kill uninitialized warning in
 trace_printk.c

On Fri, 2011-09-23 at 17:19 +0300, penberg@...helsinki.fi wrote:
> From: Pekka Enberg <penberg@...nel.org>
> 
> This patch kill the following bogus warning issued by GCC by shuffling the code
> around:
> 
>     CC      fs/ext4/balloc.o
>   kernel/trace/trace_printk.c: In function ‘module_trace_bprintk_format_notify’:
>   kernel/trace/trace_printk.c:65:14: warning: ‘fmt’ may be used uninitialized in this function [-Wuninitialized]
>   kernel/trace/trace_printk.c:52:8: note: ‘fmt’ was declared here
> 

NAK, I have a fix I just posted yesterday ;)

https://lkml.org/lkml/2011/9/22/402

-- Steve

> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> Cc: Ingo Molnar <mingo@...hat.com>
> Signed-off-by: Pekka Enberg <penberg@...nel.org>
> ---
>  kernel/trace/trace_printk.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c
> index 1f06468..25e34f5 100644
> --- a/kernel/trace/trace_printk.c
> +++ b/kernel/trace/trace_printk.c
> @@ -49,7 +49,7 @@ static
>  void hold_module_trace_bprintk_format(const char **start, const char **end)
>  {
>  	const char **iter;
> -	char *fmt;
> +	char *fmt = NULL;
>  
>  	mutex_lock(&btrace_mutex);
>  	for (iter = start; iter < end; iter++) {
> @@ -62,7 +62,7 @@ void hold_module_trace_bprintk_format(const char **start, const char **end)
>  		tb_fmt = kmalloc(sizeof(*tb_fmt), GFP_KERNEL);
>  		if (tb_fmt)
>  			fmt = kmalloc(strlen(*iter) + 1, GFP_KERNEL);
> -		if (tb_fmt && fmt) {
> +		if (fmt) {
>  			list_add_tail(&tb_fmt->list, &trace_bprintk_fmt_list);
>  			strcpy(fmt, *iter);
>  			tb_fmt->fmt = fmt;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ