]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
scsi: fc: Correct RHBA attributes length
authorJaved Hasan <jhasan@marvell.com>
Thu, 3 Jun 2021 10:14:03 +0000 (03:14 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 13 Aug 2021 07:31:39 +0000 (09:31 +0200)
BugLink: https://bugs.launchpad.net/bugs/1938340
commit 40445fd2c9fa427297acdfcc2c573ff10493f209 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: e721eb0616f6 ("scsi: scsi_transport_fc: Match HBA Attribute Length with HBAAPI V2.0 definitions")
CC: stable@vger.kernel.org
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Javed Hasan <jhasan@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
include/scsi/fc/fc_ms.h

index 9e273fed0a85fccfefac6bb8460d0b76396763ba..800d53dc94705eee89833e7db341a179490e14a5 100644 (file)
@@ -63,8 +63,8 @@ enum fc_fdmi_hba_attr_type {
  * HBA Attribute Length
  */
 #define FC_FDMI_HBA_ATTR_NODENAME_LEN          8
-#define FC_FDMI_HBA_ATTR_MANUFACTURER_LEN      80
-#define FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN      80
+#define FC_FDMI_HBA_ATTR_MANUFACTURER_LEN      64
+#define FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN      64
 #define FC_FDMI_HBA_ATTR_MODEL_LEN             256
 #define FC_FDMI_HBA_ATTR_MODELDESCR_LEN                256
 #define FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN   256