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: <20091103234747.59c0e2ca@lxorguk.ukuu.org.uk>
Date:	Tue, 3 Nov 2009 23:47:47 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Sergei Shtylyov <sshtylyov@...mvista.com>,
	linux-kernel@...r.kernel.org, david-b@...bell.net,
	Greg KH <greg@...ah.com>, Kay Sievers <kay.sievers@...y.org>,
	Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH] gpiolib: fix device_create() result check

On Tue, 3 Nov 2009 14:44:01 -0800
Andrew Morton <akpm@...ux-foundation.org> wrote:

> On Tue, 20 Oct 2009 20:35:23 +0400
> Sergei Shtylyov <sshtylyov@...mvista.com> wrote:
> 
> > In case of failure, device_create() returns not NULL but the error code.
> > The current code checks for non-NULL though which causes kernel oops in
> > sysfs_create_group() when device_create() fails.  Check for error using
> > IS_ERR() and propagate the error value using PTR_ERR() instead of fixed
> > -ENODEV code returned now...
> 
> Does anyone notice any missing information here?

its what you get for cheap hacks instead of having a ptr_err_t which is a
union so you have to get it right ;)

Alan
--
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