diff mbox series

[v2,03/11] qla2xxx: Fix for possible memory corruption

Message ID 20240710171057.35066-4-njavali@marvell.com (mailing list archive)
State Accepted
Headers show
Series qla2xxx misc. bug fixes | expand

Commit Message

Nilesh Javali July 10, 2024, 5:10 p.m. UTC
From: Shreyas Deodhar <sdeodhar@marvell.com>

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>
---
 drivers/scsi/qla2xxx/qla_os.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Himanshu Madhani July 10, 2024, 7:33 p.m. UTC | #1
On 7/10/24 10:10 AM, Nilesh Javali wrote:
> From: Shreyas Deodhar <sdeodhar@marvell.com>
> 
> 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>
> ---
>   drivers/scsi/qla2xxx/qla_os.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index fcb06df2ce4e..70f43eab3f01 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -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)

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index fcb06df2ce4e..70f43eab3f01 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -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)