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: <8d81a91b-4c1d-d0e1-60d0-a68f6ef65bd0@collabora.com>
Date:   Thu, 25 Jun 2020 10:26:28 +0200
From:   Enric Balletbo i Serra <enric.balletbo@...labora.com>
To:     wu000273@....edu, bleung@...omium.org
Cc:     groeck@...omium.org, linux-kernel@...r.kernel.org, kjlu@....edu,
        Jett Rink <jettrink@...omium.org>,
        Mathew King <mathewk@...omium.org>,
        Enrico Granata <egranata@...omium.org>
Subject: Re: [PATCH] platform/chrome: fix a double-unlock issue

Hi Qiushi,

Thank you for your patch.

On 23/5/20 5:16, wu000273@....edu wrote:
> From: Qiushi Wu <wu000273@....edu>
> 
> In function cros_ec_ishtp_probe(), "up_write" is already called
> before function "cros_ec_dev_init". But "up_write" will be called
> again after the calling of the function "cros_ec_dev_init" failed.
> Thus add a call of the function “down_write” in this if branch
> for the completion of the exception handling.
> 
> Fixes: 26a14267aff2 ("platform/chrome: Add ChromeOS EC ISHTP driver")
> Signed-off-by: Qiushi Wu <wu000273@....edu>

The change looks good to me, but I'd like someone having the hardware giving a
Tested-by tag, so cc'ing some chromeos people. They must be also interested on
backport this patch.

> ---
>  drivers/platform/chrome/cros_ec_ishtp.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/chrome/cros_ec_ishtp.c b/drivers/platform/chrome/cros_ec_ishtp.c
> index 93a71e93a2f1..41d60af618c9 100644
> --- a/drivers/platform/chrome/cros_ec_ishtp.c
> +++ b/drivers/platform/chrome/cros_ec_ishtp.c
> @@ -660,8 +660,10 @@ static int cros_ec_ishtp_probe(struct ishtp_cl_device *cl_device)
>  
>  	/* Register croc_ec_dev mfd */
>  	rv = cros_ec_dev_init(client_data);
> -	if (rv)
> +	if (rv) {
> +		down_write(&init_lock);
>  		goto end_cros_ec_dev_init_error;
> +	}
>  
>  	return 0;
>  
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ