Commit 6f50638f authored by Dan Carpenter's avatar Dan Carpenter Committed by Zheng Zengkai
Browse files

scsi: lpfc: Use correct scnprintf() limit

stable inclusion
from stable-5.10.70
commit 0595fc4794c3b0ac9c88d7c609d66c71ba9811b5
bugzilla: 182949 https://gitee.com/openeuler/kernel/issues/I4I3GQ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0595fc4794c3b0ac9c88d7c609d66c71ba9811b5

--------------------------------

[ Upstream commit 6dacc371 ]

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: 5b9e70b2 ("scsi: lpfc: raise sg count for nvme to use available sg resources")
Reviewed-by: default avatarJames Smart <jsmart2021@gmail.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>

Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 1c407737
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment