summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-10-06 10:32:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-17 09:48:43 +0100
commit20dfad97dbd6a8a33273ab24753eb95877460014 (patch)
tree719fd6e5d9c2253ad3203ab5fd2353619fb76a42 /drivers/scsi
parent5ead6f4feaa7697de2977921438fdf61fcf5d188 (diff)
downloadlinux-20dfad97dbd6a8a33273ab24753eb95877460014.tar.gz
linux-20dfad97dbd6a8a33273ab24753eb95877460014.tar.bz2
linux-20dfad97dbd6a8a33273ab24753eb95877460014.zip
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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/csiostor/csio_lnode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/csiostor/csio_lnode.c b/drivers/scsi/csiostor/csio_lnode.c
index 23cbe4cda760..c3bf590f5d68 100644
--- a/drivers/scsi/csiostor/csio_lnode.c
+++ b/drivers/scsi/csiostor/csio_lnode.c
@@ -619,7 +619,7 @@ csio_ln_vnp_read_cbfn(struct csio_hw *hw, struct csio_mb *mbp)
struct fc_els_csp *csp;
struct fc_els_cssp *clsp;
enum fw_retval retval;
- __be32 nport_id;
+ __be32 nport_id = 0;
retval = FW_CMD_RETVAL_G(ntohl(rsp->alloc_to_len16));
if (retval != FW_SUCCESS) {