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: <e9e4dcf0-f42d-a4c6-0be8-5c7cb84c91ea@acm.org>
Date:   Fri, 6 Aug 2021 15:12:40 -0700
From:   Bart Van Assche <bvanassche@....org>
To:     Colin King <colin.king@...onical.com>,
        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>,
        Daejun Park <daejun7.park@...sung.com>,
        linux-scsi@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] scsi: ufs: Fix unsigned int compared with less than
 zero

On 8/6/21 7:43 AM, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> Variable tag is currently and unsigned int and is being compared to
> less than zero, this check is always false. Fix this by making tag
> an int.
> 
> Addresses-Coverity: ("Macro compares unsigned to 0")
> Fixes: 4728ab4a8e64 ("scsi: ufs: Remove ufshcd_valid_tag()")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>   drivers/scsi/ufs/ufshcd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 47a5085f16a9..21378682cb4f 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -6976,7 +6976,7 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
>   {
>   	struct Scsi_Host *host = cmd->device->host;
>   	struct ufs_hba *hba = shost_priv(host);
> -	unsigned int tag = cmd->request->tag;
> +	int tag = cmd->request->tag;
>   	struct ufshcd_lrb *lrbp = &hba->lrb[tag];
>   	unsigned long flags;
>   	int err = FAILED;

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

Thanks!

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ