Patch "scsi: csiostor: Uninitialized data in csio_ln_vnp_read_cbfn()" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: csiostor: Uninitialized data in csio_ln_vnp_read_cbfn()

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-csiostor-uninitialized-data-in-csio_ln_vnp_read.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1149bcf4ff9b0dfa0856cee58e7883f0da6f0414
Author: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date:   Wed Oct 6 10:32:43 2021 +0300

    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@xxxxxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/csiostor/csio_lnode.c b/drivers/scsi/csiostor/csio_lnode.c
index dc98f51f466fb..d5ac938970232 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) {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux