Skip to content

Commit

Permalink
scsi: csiostor: Uninitialized data in csio_ln_vnp_read_cbfn()
Browse files Browse the repository at this point in the history
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: 5036f0a ("[SCSI] csiostor: Fix sparse warnings.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Dan Carpenter authored and Martin K. Petersen committed Oct 12, 2021
1 parent ec65e6b commit f4875d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/csiostor/csio_lnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f4875d5

Please sign in to comment.