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: <185F81ED-2471-44EA-90D5-08503A719426@oracle.com>
Date:   Tue, 27 Sep 2022 18:26:12 +0000
From:   Himanshu Madhani <himanshu.madhani@...cle.com>
To:     Rafael Mendonca <rafaelmendsr@...il.com>
CC:     Nilesh Javali <njavali@...vell.com>,
        GR-QLogic-Storage-Upstream <GR-QLogic-Storage-Upstream@...vell.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        Martin Petersen <martin.petersen@...cle.com>,
        Himanshu Madhani <himanshu.madhani@...ium.com>,
        Quinn Tran <quinn.tran@...ium.com>,
        linux-scsi <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] scsi: qla2xxx: Fix serialization of DCBX TLV data request



> On Sep 26, 2022, at 4:02 PM, Rafael Mendonca <rafaelmendsr@...il.com> wrote:
> 
> Commit b6faaaf796d7 ("scsi: qla2xxx: Serialize mailbox request") serialized
> mailbox requests from userspace using the 'optrom' mutex. However, in the
> case of DCBX TLV data, if the memory for it is already allocated, then the
> mailbox request ends up not being serialized because it is done without
> holding the 'optrom' mutex.
> 
> Fixes: b6faaaf796d7 ("scsi: qla2xxx: Serialize mailbox request")
> Signed-off-by: Rafael Mendonca <rafaelmendsr@...il.com>
> ---
> drivers/scsi/qla2xxx/qla_attr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
> index fa1fcbfb946f..c2bc7f9c728a 100644
> --- a/drivers/scsi/qla2xxx/qla_attr.c
> +++ b/drivers/scsi/qla2xxx/qla_attr.c
> @@ -951,9 +951,9 @@ qla2x00_sysfs_read_dcbx_tlv(struct file *filp, struct kobject *kobj,
> 	if (!capable(CAP_SYS_ADMIN) || off != 0 || count > DCBX_TLV_DATA_SIZE)
> 		return 0;
> 
> +	mutex_lock(&vha->hw->optrom_mutex);
> 	if (ha->dcbx_tlv)
> 		goto do_read;
> -	mutex_lock(&vha->hw->optrom_mutex);
> 	if (qla2x00_chip_is_down(vha)) {
> 		mutex_unlock(&vha->hw->optrom_mutex);
> 		return 0;
> -- 
> 2.34.1
> 

Looks Good. 

Reviewed-by: Himanshu Madhani <himanshu.madhani@...cle.com>

-- 
Himanshu Madhani	Oracle Linux Engineering

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ