提交 237f6e36 编写于 作者: J Javed Hasan 提交者: Zheng Zengkai

scsi: fc: Correct RHBA attributes length

stable inclusion
from stable-5.10.50
commit e2e615e6317bf610159bab4eb8fa9b4d9ec2c010
bugzilla: 174522 https://gitee.com/openeuler/kernel/issues/I4DNFY

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e2e615e6317bf610159bab4eb8fa9b4d9ec2c010

--------------------------------

commit 40445fd2 upstream.

As per the FC-GS-5 specification, attribute lengths of node_name and
manufacturer should in range of "4 to 64 Bytes" only.

Link: https://lore.kernel.org/r/20210603101404.7841-2-jhasan@marvell.com
Fixes: e721eb06 ("scsi: scsi_transport_fc: Match HBA Attribute Length with HBAAPI V2.0 definitions")
CC: stable@vger.kernel.org
Reviewed-by: NHimanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: NJaved Hasan <jhasan@marvell.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 43341db1
...@@ -63,8 +63,8 @@ enum fc_fdmi_hba_attr_type { ...@@ -63,8 +63,8 @@ enum fc_fdmi_hba_attr_type {
* HBA Attribute Length * HBA Attribute Length
*/ */
#define FC_FDMI_HBA_ATTR_NODENAME_LEN 8 #define FC_FDMI_HBA_ATTR_NODENAME_LEN 8
#define FC_FDMI_HBA_ATTR_MANUFACTURER_LEN 80 #define FC_FDMI_HBA_ATTR_MANUFACTURER_LEN 64
#define FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN 80 #define FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN 64
#define FC_FDMI_HBA_ATTR_MODEL_LEN 256 #define FC_FDMI_HBA_ATTR_MODEL_LEN 256
#define FC_FDMI_HBA_ATTR_MODELDESCR_LEN 256 #define FC_FDMI_HBA_ATTR_MODELDESCR_LEN 256
#define FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN 256 #define FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN 256
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册