]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
scsi: lpfc: Use correct scnprintf() limit
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 16 Sep 2021 13:23:31 +0000 (16:23 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 5 Nov 2021 08:12:44 +0000 (09:12 +0100)
commite7bcba33dbc33ce1cf1b25fbc673887acb0b123d
treed6d7ffc93a527358063ba946789375469dd7d036
parent16916fb7f365d29885b342043e6b4e2b644fc6fe
scsi: lpfc: Use correct scnprintf() limit

BugLink: https://bugs.launchpad.net/bugs/1947886
[ Upstream commit 6dacc371b77f473770ec646e220303a84fe96c11 ]

The limit should be "PAGE_SIZE - len" instead of "PAGE_SIZE".  We're not
going to hit the limit so this fix will not affect runtime.

Link: https://lore.kernel.org/r/20210916132331.GE25094@kili
Fixes: 5b9e70b22cc5 ("scsi: lpfc: raise sg count for nvme to use available sg resources")
Reviewed-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/scsi/lpfc/lpfc_attr.c