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]
Date:   Fri, 25 May 2018 18:21:54 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Florian Schmaus <flo@...kplace.eu>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 0/3] driver-core: return EINVAL error instead of
 BUG_ON()

On Wed, May 23, 2018 at 05:59:10PM +0200, Florian Schmaus wrote:
> This patch series makes driver_register() emit an error message and
> return a failure code instead of triggering a BUG_ON().
> 
> The first patch will cause driver_register() to fail gracefully if the
> driver's bus was not initialized while printing out the name of the
> faulty driver *and* the name of the involved bus. The second patch
> records the error code if bus_register() fails. The third and final
> patch of the series extends the first patch so that the recorded error
> code is also print out if non-zero. Otherwise, if drv->bus->p is NULL
> but the error code is zero, then probably bus_register() was never
> called before.
> 
> Greg questioned [1] whether [2/3] and [3/3] are necessary:
> 
> > And really, when has this ever happened?  Why would a bus registration
> > fail and later allow a driver to be registered?
> 
> I initially assumed that this is what cause me hitting the BUG_ON()
> which [1/3] replaces: The bus registration failed and then the driver
> attempts to register itself. But I did not had a chance to verify
> that. I'll try to do so after my vacation. Meanwhile I hope that at
> least [1/3] is considered an improvement of the kernel. If so, feel
> free to pick it up.

I've picked up patch 1, I don't think patches 2 or 3 are needed, due to
the extreme unfrequency that this problem ever happens :)

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ