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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111128162501.GE2201@m.brq.redhat.com>
Date:	Mon, 28 Nov 2011 17:25:01 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	fweisbec@...il.com, mingo@...hat.com, paulus@...ba.org,
	acme@...stprotocols.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/9] trace: Fix uninitialized variable compiler warning



On Mon, Nov 28, 2011 at 11:19:18AM -0500, Steven Rostedt wrote:
> On Sun, 2011-11-27 at 19:04 +0100, Jiri Olsa wrote:
> > Initialize page2 variable to make compiler happy.
> 
> What compiler is this? Because this is a compiler bug. In fact, there's
> no check for page2 being NULL, so if it is used uninitialized it will
> crash the kernel. I don't like these "make the compiler shut up" fixes,
> because honestly, changes like this hide bugs.

[jolsa@...va1 ~]$ gcc --version
gcc (GCC) 4.4.5 20110214 (Red Hat 4.4.5-6)

> 
> Nacked-by: Steven Rostedt <rostedt@...dmis.org>

understood, np

jirka
> 
> -- Steve
> 
> > 
> > Signed-off-by: Jiri Olsa <jolsa@...hat.com>
> > ---
> >  kernel/trace/trace.c |    3 +--
> >  1 files changed, 1 insertions(+), 2 deletions(-)
> > 
> > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> > index 9e158cc..4a06862 100644
> > --- a/kernel/trace/trace.c
> > +++ b/kernel/trace/trace.c
> > @@ -3655,8 +3655,7 @@ tracing_mark_write(struct file *filp, const char __user *ubuf,
> >  	struct page *pages[2];
> >  	int nr_pages = 1;
> >  	ssize_t written;
> > -	void *page1;
> > -	void *page2;
> > +	void *page1, *page2 = NULL;
> >  	int offset;
> >  	int size;
> >  	int len;
> 
> 
--
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