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: <6784a588-b9ff-ebc5-8b34-785f5d3b04c5@intel.com>
Date:   Sat, 10 Apr 2021 11:57:15 +0300
From:   Adrian Hunter <adrian.hunter@...el.com>
To:     Asutosh Das <asutoshd@...eaurora.org>, cang@...eaurora.org,
        martin.petersen@...cle.com, linux-scsi@...r.kernel.org
Cc:     linux-arm-msm@...r.kernel.org,
        Alim Akhtar <alim.akhtar@...sung.com>,
        Avri Altman <avri.altman@....com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        Stanley Chu <stanley.chu@...iatek.com>,
        Bean Huo <beanhuo@...ron.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v17 2/2] ufs: sysfs: Resume the proper scsi device

On 8/04/21 5:49 pm, Asutosh Das wrote:
> Resumes the actual scsi device the unit descriptor of which
> is being accessed instead of the hba alone.
> 
> Reviewed-by: Can Guo <cang@...eaurora.org>
> Signed-off-by: Asutosh Das <asutoshd@...eaurora.org>
> ---
>  drivers/scsi/ufs/ufs-sysfs.c | 30 +++++++++++++++++-------------
>  1 file changed, 17 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufs-sysfs.c b/drivers/scsi/ufs/ufs-sysfs.c
> index d7c3cff..fa57bac 100644
> --- a/drivers/scsi/ufs/ufs-sysfs.c
> +++ b/drivers/scsi/ufs/ufs-sysfs.c

<SNIP>

> @@ -899,11 +899,15 @@ static ssize_t _pname##_show(struct device *dev,			\
>  	struct scsi_device *sdev = to_scsi_device(dev);			\
>  	struct ufs_hba *hba = shost_priv(sdev->host);			\
>  	u8 lun = ufshcd_scsi_to_upiu_lun(sdev->lun);			\
> +	int ret;							\
>  	if (!ufs_is_valid_unit_desc_lun(&hba->dev_info, lun,		\
>  				_duname##_DESC_PARAM##_puname))		\
>  		return -EINVAL;						\
> -	return ufs_sysfs_read_desc_param(hba, QUERY_DESC_IDN_##_duname,	\
> +	scsi_autopm_get_device(sdev);					\
> +	ret = ufs_sysfs_read_desc_param(hba, QUERY_DESC_IDN_##_duname,	\
>  		lun, _duname##_DESC_PARAM##_puname, buf, _size);	\
> +	scsi_autopm_put_device(sdev);					\
> +	return ret;							\

I am not sure why this change is needed.  It it is needed, please add
a comment explaining.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ