Commit 20ec46bb authored by Dan Carpenter's avatar Dan Carpenter Committed by Zheng Zengkai
Browse files

scsi: lpfc: Terminate string in lpfc_debugfs_nvmeio_trc_write()

stable inclusion
from stable-v5.10.90
commit fcb32eb3d04d4a84fbb2c374ab2ffd4d684d674e
bugzilla: 186168 https://gitee.com/openeuler/kernel/issues/I4SHY1

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

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

[ Upstream commit 9020be11 ]

The "mybuf" string comes from the user, so we need to ensure that it is NUL
terminated.

Link: https://lore.kernel.org/r/20211214070527.GA27934@kili


Fixes: bd2cdd5e ("scsi: lpfc: NVME Initiator: Add debugfs support")
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>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent c9d1906a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment