scsi: lpfc: Terminate string in lpfc_debugfs_nvmeio_trc_write()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 14 Dec 2021 07:05:27 +0000 (10:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jan 2022 11:42:34 +0000 (12:42 +0100)
commita68d72d899a2051e5a05f78aed9604fbc1f3ff34
treed621334d3b313f0e1ee38735ae3eb5a10467b56b
parent172fc0a7d7abdb94b94544765ae13348862b1abf
scsi: lpfc: Terminate string in lpfc_debugfs_nvmeio_trc_write()

[ Upstream commit 9020be114a47bf7ff33e179b3bb0016b91a098e6 ]

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: bd2cdd5e400f ("scsi: lpfc: NVME Initiator: Add debugfs support")
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>
drivers/scsi/lpfc/lpfc_debugfs.c