Re: [PATCH] scsi: lpfc: Fix gcc -Wstringop-overread warning, again
From: Martin K. Petersen
Date: Wed Sep 22 2021 - 00:45:23 EST
On Mon, 20 Sep 2021 11:56:22 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> 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),
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> [...]
Applied to 5.15/scsi-fixes, thanks!
[1/1] scsi: lpfc: Fix gcc -Wstringop-overread warning, again
https://git.kernel.org/mkp/scsi/c/a38923f2d088
--
Martin K. Petersen Oracle Linux Engineering