]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scsi: qla2xxx: Fix for possible memory corruption
authorShreyas Deodhar <sdeodhar@marvell.com>
Wed, 10 Jul 2024 17:10:49 +0000 (22:40 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Aug 2024 07:00:51 +0000 (09:00 +0200)
commit c03d740152f78e86945a75b2ad541bf972fab92a upstream.

Init Control Block is dereferenced incorrectly.  Correctly dereference ICB

Cc: stable@vger.kernel.org
Signed-off-by: Shreyas Deodhar <sdeodhar@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20240710171057.35066-4-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/qla2xxx/qla_os.c

index fcb06df2ce4e683399f850b11f054f696cfebd0d..70f43eab3f0185112d27ac5124e58cafbe681138 100644 (file)
@@ -4689,7 +4689,7 @@ static void
 qla2x00_number_of_exch(scsi_qla_host_t *vha, u32 *ret_cnt, u16 max_cnt)
 {
        u32 temp;
-       struct init_cb_81xx *icb = (struct init_cb_81xx *)&vha->hw->init_cb;
+       struct init_cb_81xx *icb = (struct init_cb_81xx *)vha->hw->init_cb;
        *ret_cnt = FW_DEF_EXCHANGES_CNT;
 
        if (max_cnt > vha->hw->max_exchg)