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: Thu, 15 Feb 2024 10:22:46 -0800
From: Bart Van Assche <bvanassche@....org>
To: Dan Carpenter <dan.carpenter@...aro.org>,
 Peter Wang <peter.wang@...iatek.com>
Cc: Alim Akhtar <alim.akhtar@...sung.com>, Avri Altman <avri.altman@....com>,
 "James E.J. Bottomley" <jejb@...ux.ibm.com>,
 "Martin K. Petersen" <martin.petersen@...cle.com>,
 Stanley Chu <stanley.chu@...iatek.com>, Can Guo <quic_cang@...cinc.com>,
 "Bao D. Nguyen" <quic_nguyenb@...cinc.com>,
 Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
 Bean Huo <beanhuo@...ron.com>, Ziqi Chen <quic_ziqichen@...cinc.com>,
 Adrien Thierry <athierry@...hat.com>, linux-scsi@...r.kernel.org,
 linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] scsi: ufs: uninitialized variable in
 ufshcd_devfreq_target()

On 2/13/24 10:08, Dan Carpenter wrote:
> There is one goto where "sched_clk_scaling_suspend_work" is true but
> "scale_up" is uninitialized.  It leads to a Smatch uninitialized variable
> warning:
> 
> drivers/ufs/core/ufshcd.c:1589 ufshcd_devfreq_target() error: uninitialized symbol 'scale_up'.
> 
> Fixes: 1d969731b87f ("scsi: ufs: core: Only suspend clock scaling if scaling down")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
>   drivers/ufs/core/ufshcd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index d10a77d05d2f..a8a9edb7ba24 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -1514,7 +1514,7 @@ static int ufshcd_devfreq_target(struct device *dev,
>   	int ret = 0;
>   	struct ufs_hba *hba = dev_get_drvdata(dev);
>   	ktime_t start;
> -	bool scale_up, sched_clk_scaling_suspend_work = false;
> +	bool scale_up = false, sched_clk_scaling_suspend_work = false;
>   	struct list_head *clk_list = &hba->clk_list_head;
>   	struct ufs_clk_info *clki;
>   	unsigned long irq_flags;

Reviewed-by: Bart Van Assche <bvanassche@....org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ