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]
Message-ID: <1623220157.11234.0.camel@mtkswgap22>
Date:   Wed, 9 Jun 2021 14:29:17 +0800
From:   Stanley Chu <stanley.chu@...iatek.com>
To:     Can Guo <cang@....qualcomm.com>
CC:     <asutoshd@...eaurora.org>, <nguyenb@...eaurora.org>,
        <hongwus@...eaurora.org>, <ziqichen@...eaurora.org>,
        <linux-scsi@...r.kernel.org>, <kernel-team@...roid.com>,
        <cang@...eaurora.org>, 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>,
        Bean Huo <beanhuo@...ron.com>,
        Jaegeuk Kim <jaegeuk@...nel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] scsi: ufs: Fix a possible use before initialization case

On Tue, 2021-06-08 at 20:36 -0700, Can Guo wrote:
> In ufshcd_exec_dev_cmd(), if error happens before lrpb is initialized,
> then we should bail out instead of letting trace record the error.
> 
> Fixes: a45f937110fa6 ("scsi: ufs: Optimize host lock on transfer requests send/compl paths")
> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Can Guo <cang@....qualcomm.com>
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index fe1b5f4..0d54ab7 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -2972,7 +2972,7 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba,
>  
>  	if (unlikely(test_bit(tag, &hba->outstanding_reqs))) {
>  		err = -EBUSY;
> -		goto out;
> +		goto out_put_tag;
>  	}
>  
>  	init_completion(&wait);

Reviewed-by: Stanley Chu <stanley.chu@...iatek.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ