]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: csiostor: Uninitialized data in csio_ln_vnp_read_cbfn()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 6 Oct 2021 07:32:43 +0000 (10:32 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 10:36:13 +0000 (11:36 +0100)
commitb459cb94329e1739c403227b7a91c08cc9af224c
tree7da6ebc0f4e29eb2220086ae4c92d6bb74e8a05a
parent7f5c2c6e8ee0cc16be4e2fae26d3293591f48266
scsi: csiostor: Uninitialized data in csio_ln_vnp_read_cbfn()

[ Upstream commit f4875d509a0a78ad294a1a538d534b5ba94e685a ]

This variable is just a temporary variable, used to do an endian
conversion.  The problem is that the last byte is not initialized.  After
the conversion is completely done, the last byte is discarded so it doesn't
cause a problem.  But static checkers and the KMSan runtime checker can
detect the uninitialized read and will complain about it.

Link: https://lore.kernel.org/r/20211006073242.GA8404@kili
Fixes: 5036f0a0ecd3 ("[SCSI] csiostor: Fix sparse warnings.")
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/csiostor/csio_lnode.c