linux-stable/drivers/scsi/lpfc
Arnd Bergmann a38923f2d0 scsi: lpfc: Fix gcc -Wstringop-overread warning, again
I fixed a stringop-overread warning earlier this year, now a second copy of
the original code was added and the warning came back:

drivers/scsi/lpfc/lpfc_attr.c: In function 'lpfc_cmf_info_show':
drivers/scsi/lpfc/lpfc_attr.c:289:25: error: 'strnlen' specified bound 4095 exceeds source size 24 [-Werror=stringop-overread]
  289 |                         strnlen(LPFC_INFO_MORE_STR, PAGE_SIZE - 1),
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix it the same way as the other copy.

Link: https://lore.kernel.org/r/20210920095628.1191676-1-arnd@kernel.org
Fixes: ada48ba70f ("scsi: lpfc: Fix gcc -Wstringop-overread warning")
Fixes: 74a7baa2a3 ("scsi: lpfc: Add cmf_info sysfs entry")
Reviewed-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-09-22 00:16:38 -04:00
..
lpfc.h scsi: lpfc: Add cmf_info sysfs entry 2021-08-24 22:56:34 -04:00
lpfc_attr.c scsi: lpfc: Fix gcc -Wstringop-overread warning, again 2021-09-22 00:16:38 -04:00
lpfc_attr.h
lpfc_bsg.c scsi: lpfc: Add bsg support for retrieving adapter cmf data 2021-08-24 22:56:34 -04:00
lpfc_bsg.h scsi: lpfc: Copyright updates for 14.0.0.1 patches 2021-08-24 22:56:34 -04:00
lpfc_compat.h
lpfc_crtn.h scsi: lpfc: Add cmf_info sysfs entry 2021-08-24 22:56:34 -04:00
lpfc_ct.c scsi: lpfc: Add EDC ELS support 2021-08-24 22:56:33 -04:00
lpfc_debugfs.c scsi: lpfc: Add debugfs support for cm framework buffers 2021-08-24 22:56:34 -04:00
lpfc_debugfs.h scsi: lpfc: Copyright updates for 14.0.0.1 patches 2021-08-24 22:56:34 -04:00
lpfc_disc.h scsi: lpfc: Delay unregistering from transport until GIDFT or ADISC completes 2021-07-18 22:30:37 -04:00
lpfc_els.c scsi: lpfc: Fix sprintf() overflow in lpfc_display_fpin_wwpn() 2021-09-22 00:14:34 -04:00
lpfc_hbadisc.c scsi: lpfc: Add support for the CM framework 2021-08-24 22:56:34 -04:00
lpfc_hw.h scsi: lpfc: Add EDC ELS support 2021-08-24 22:56:33 -04:00
lpfc_hw4.h scsi: lpfc: Fix CPU to/from endian warnings introduced by ELS processing 2021-09-13 22:15:40 -04:00
lpfc_ids.h scsi: lpfc: Copyright updates for 14.0.0.0 patches 2021-07-27 00:06:41 -04:00
lpfc_init.c scsi: lpfc: Fix compilation errors on kernels with no CONFIG_DEBUG_FS 2021-09-13 22:15:41 -04:00
lpfc_logmsg.h scsi: lpfc: Copyright updates for 14.0.0.1 patches 2021-08-24 22:56:34 -04:00
lpfc_mbox.c scsi: lpfc: Revise Topology and RAS support checks for new adapters 2021-07-27 00:06:41 -04:00
lpfc_mem.c scsi: lpfc: Copyright updates for 14.0.0.1 patches 2021-08-24 22:56:34 -04:00
lpfc_nl.h
lpfc_nportdisc.c scsi: lpfc: Skip issuing ADISC when node is in NPR state 2021-07-18 22:30:37 -04:00
lpfc_nvme.c scsi: lpfc: Fix compilation errors on kernels with no CONFIG_DEBUG_FS 2021-09-13 22:15:41 -04:00
lpfc_nvme.h scsi: lpfc: Add cmf_info sysfs entry 2021-08-24 22:56:34 -04:00
lpfc_nvmet.c scsi: lpfc: Fix possible ABBA deadlock in nvmet_xri_aborted() 2021-07-30 23:47:19 -04:00
lpfc_scsi.c scsi: lpfc: Remove unneeded variable 2021-09-13 22:15:42 -04:00
lpfc_scsi.h scsi: lpfc: Copyright updates for 14.0.0.0 patches 2021-07-27 00:06:41 -04:00
lpfc_sli.c scsi: lpfc: Fix CPU to/from endian warnings introduced by ELS processing 2021-09-13 22:15:40 -04:00
lpfc_sli.h scsi: lpfc: Add support for the CM framework 2021-08-24 22:56:34 -04:00
lpfc_sli4.h scsi: lpfc: Add support for the CM framework 2021-08-24 22:56:34 -04:00
lpfc_version.h scsi: lpfc: Update lpfc version to 14.0.0.1 2021-08-24 22:56:34 -04:00
lpfc_vport.c scsi: lpfc: Update copyrights for 12.8.0.7 and 12.8.0.8 changes 2021-03-04 17:37:06 -05:00
lpfc_vport.h
Makefile