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: <9b1d7c15-16a6-478d-975c-5c375f8674fe@gmail.com>
Date: Tue, 23 Jan 2024 21:46:51 +0100
From: Aleksa Savic <savicaleksa83@...il.com>
To: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>,
 Jean Delvare <jdelvare@...e.com>, Guenter Roeck <linux@...ck-us.net>,
 linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: savicaleksa83@...il.com, dan.carpenter@...aro.org,
 kernel-janitors@...r.kernel.org, error27@...il.com
Subject: Re: [PATCH] hwmon: gigabyte_waterforce: Fix locking bug in
 waterforce_get_status()

On 2024-01-22 16:49:52 GMT+01:00, Harshit Mogalapalli wrote:
> Goto 'unlock_and_return' for unlocking before returning on the error
> path.
> 
> Fixes: d5939a793693 ("hwmon: Add driver for Gigabyte AORUS Waterforce AIO coolers")
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
> ---
> This is based on static analysis with smatch, only compile tested.
> ---
>  drivers/hwmon/gigabyte_waterforce.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/gigabyte_waterforce.c b/drivers/hwmon/gigabyte_waterforce.c
> index 1799377fc2f1..7bccfe2eaa76 100644
> --- a/drivers/hwmon/gigabyte_waterforce.c
> +++ b/drivers/hwmon/gigabyte_waterforce.c
> @@ -146,7 +146,7 @@ static int waterforce_get_status(struct waterforce_data *priv)
>  	/* Send command for getting status */
>  	ret = waterforce_write_expanded(priv, get_status_cmd, GET_STATUS_CMD_LENGTH);
>  	if (ret < 0)
> -		return ret;
> +		goto unlock_and_return;
>  
>  	ret = wait_for_completion_interruptible_timeout(&priv->status_report_received,
>  							msecs_to_jiffies(STATUS_VALIDITY));

Reviewed-by: Aleksa Savic <savicaleksa83@...il.com>

Thanks,
Aleksa

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ