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: <0354481c-c6a3-4573-a138-56449b55034c@stanley.mountain>
Date: Wed, 23 Apr 2025 13:05:53 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Jerome Brunet <jbrunet@...libre.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Dave Ertman <david.m.ertman@...el.com>,
	Ira Weiny <ira.weiny@...el.com>, Leon Romanovsky <leon@...nel.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Danilo Krummrich <dakr@...nel.org>, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH next] driver core: auxiliary bus: Fix IS_ERR() vs NULL
 check in __devm_auxiliary_device_create()

On Wed, Apr 23, 2025 at 11:31:56AM +0200, Jerome Brunet wrote:
> On Wed 23 Apr 2025 at 11:17, Dan Carpenter <dan.carpenter@...aro.org> wrote:
> 
> > The auxiliary_device_create() function returns NULL.  It doesn't return
> > error pointers.  Update the checking to match.
> >
> > Fixes: eaa0d30216c1 ("driver core: auxiliary bus: add device creation helpers")
> > Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> 
> Thanks for catching this mistake Dan.
> 
> The thing was initially setup to return error code. Greg asked to
> simply return NULL on error and I forgot to re-align the devm variant.
> 
> So I think the fix should be to check for NULL as you did but return
> NULL too so it is aligned with non-devm variant.
> 
> If you wish, I can handle a v2.

Of course, it's hard to resist an offer like that but I can send a v2.

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ