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]
Date:	Sun, 1 Oct 2006 09:19:23 -0700 (PDT)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Jeff Garzik <jeff@...zik.org>
cc:	Andrew Morton <akpm@...l.org>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fs/eventpoll: error handling micro-cleanup

On Sun, 1 Oct 2006, Jeff Garzik wrote:

> Davide Libenzi wrote:
> > On Sun, 1 Oct 2006, Jeff Garzik wrote:
> > 
> > > While reviewing the 'may be used uninitialized' bogus gcc warnings,
> > > I noticed that an error code assignment was only needed if an error had
> > > actually occured.
> > 
> > But that saved one line of code, and there are countless occurences in the
> > kernel of such code pattern ;)
> 
> I'm not sure there are countless occurrences with PTR_ERR().  The line is
> incorrect (but harmless) if inode is a valid pointer...

I just tried a `find /usr/src/linux-2.6.16/ -type f -exec grep -H -C 2 PTR_ERR {} \;`
and looked at the cases where the error variable is assigned in any case 
before the test. Same code pattern as, like:

error = -EFAULT;
if (copy_from_user(...))
	goto kaboom;

Again, expect a big patch if you're gonna fix all those ;)



- Davide


-
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