]> git.proxmox.com Git - mirror_ubuntu-hirsute-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 09:20:23 +0000 (10:20 +0100)
commit3916367953c07d89046b635c4198161a47d1fec2
tree284787dc5c83fc621ac71f4771d565e8a17ed7e2
parent6ea0468874591948c90684931e5cf53adff6fedb
scsi: lpfc: Use correct scnprintf() limit

BugLink: https://bugs.launchpad.net/bugs/1949640
[ 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: Stefan Bader <stefan.bader@canonical.com>
drivers/scsi/lpfc/lpfc_attr.c