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: <5b2a364e-0a8d-ffa6-139b-3e3e46a0213d@acm.org>
Date:   Wed, 15 Feb 2023 10:42:20 -0800
From:   Bart Van Assche <bvanassche@....org>
To:     Asutosh Das <quic_asutoshd@...cinc.com>, quic_cang@...cinc.com,
        martin.petersen@...cle.com, linux-scsi@...r.kernel.org
Cc:     quic_nguyenb@...cinc.com, quic_xiaosenh@...cinc.com,
        stanley.chu@...iatek.com, adrian.hunter@...el.com,
        avri.altman@....com, mani@...nel.org, beanhuo@...ron.com,
        linux-arm-msm@...r.kernel.org,
        Alim Akhtar <alim.akhtar@...sung.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        Jinyoung Choi <j-young.choi@...sung.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 1/1] ufs: mcq: fix incorrectly set queue depth

On 2/14/23 09:50, Asutosh Das wrote:
> ufshcd_config_mcq() may change the can_queue value.
> The current code invokes scsi_add_host() before ufshcd_config_mcq().
> So the tags are limited to the old can_queue value.
> 
> Fix this by invoking scsi_add_host() after ufshcd_config_mcq().

Please add a Fixes: tag.

> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 3b3cf78..04e42b2 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -8535,6 +8535,8 @@ static int ufshcd_device_init(struct ufs_hba *hba, bool init_dev_params)
>   				use_mcq_mode = false;
>   				dev_err(hba->dev, "MCQ mode is disabled, err=%d\n",
>   					 ret);
> +			} else {
> +				ufshcd_config_mcq(hba);
>   			}

Please rework this code such that the success case (ret == 0) is handled 
first. That is the approach followed elsewhere in the Linux kernel.

Otherwise this patch looks good to me.

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ