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: <Yv9a9+iREzQWYecQ@kroah.com>
Date:   Fri, 19 Aug 2022 11:42:15 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Yang Yingliang <yangyingliang@...wei.com>
Cc:     linux-kernel@...r.kernel.org, rafael@...nel.org
Subject: Re: [PATCH -next] driver core: switch to use dev_err_probe()

On Fri, Aug 19, 2022 at 05:46:56PM +0800, Yang Yingliang wrote:
> Use dev_err_probe() to simplify code and print error code.
> 
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> ---
>  drivers/base/core.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 753e7cca0f40..e51a09f9d0ec 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -2507,11 +2507,9 @@ static ssize_t uevent_store(struct device *dev, struct device_attribute *attr,
>  	int rc;
>  
>  	rc = kobject_synth_uevent(&dev->kobj, buf, count);
> -
> -	if (rc) {
> -		dev_err(dev, "uevent: failed to send synthetic uevent\n");
> -		return rc;
> -	}
> +	if (rc)
> +		return dev_err_probe(dev, rc,
> +				     "uevent: failed to send synthetic uevent\n");

I do not understand this at all, this is not on the probe path at all,
so why is this function needed?

Have you tested this?  What was the resulting output before and after
this change?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ