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:   Tue, 15 May 2018 17:12:40 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Florian Schmaus <flo@...kplace.eu>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 3/3] driver-core: print bus registration error value

On Tue, May 15, 2018 at 03:51:14PM +0200, Florian Schmaus wrote:
> Signed-off-by: Florian Schmaus <flo@...kplace.eu>
> ---
>  drivers/base/driver.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/base/driver.c b/drivers/base/driver.c
> index afd5b08b7677..c68d35139c0f 100644
> --- a/drivers/base/driver.c
> +++ b/drivers/base/driver.c
> @@ -149,8 +149,9 @@ int driver_register(struct device_driver *drv)
>  	struct device_driver *other;
>  
>  	if (!drv->bus->p) {
> -		printk(KERN_ERR "Driver '%s' was unable to register bus_type\n",
> -			   drv->name);
> +		printk(KERN_ERR "Driver '%s' was unable to register bus_type "
> +			   "(error: %d)\n",
> +			   drv->name, drv->bus->bus_register_retval);

I don't understand, if a bus was never registered, this is going to fail
in lots of odd ways, including the value being 0, so that would show "no
error"?  Is this really needed?

A better message would be something like:
	"Driver '%s" was unable to register with bus_type '%s' because it was not initialized."

right?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ