diff mbox series

[09/10] Revert "scsi: qla2xxx: Fix buffer overrun"

Message ID 20230801114057.27039-10-njavali@marvell.com
State Superseded
Headers show
Series qla2xxx driver misc features | expand

Commit Message

Nilesh Javali Aug. 1, 2023, 11:40 a.m. UTC
Revert due to Get PLOGI Template failed.
This reverts commit b68710a8094fdffe8dd4f7a82c82649f479bb453.

Cc: stable@vger.kernel.org
Signed-off-by: Nilesh Javali <njavali@marvell.com>
---
 drivers/scsi/qla2xxx/qla_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Himanshu Madhani Aug. 2, 2023, 8:17 p.m. UTC | #1
On 8/1/23 04:40, Nilesh Javali wrote:
> Revert due to Get PLOGI Template failed.
> This reverts commit b68710a8094fdffe8dd4f7a82c82649f479bb453.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Nilesh Javali <njavali@marvell.com>
> ---
>   drivers/scsi/qla2xxx/qla_init.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
> index 62087ce51b3f..d4df07aaa0ab 100644
> --- a/drivers/scsi/qla2xxx/qla_init.c
> +++ b/drivers/scsi/qla2xxx/qla_init.c
> @@ -5607,7 +5607,7 @@ static void qla_get_login_template(scsi_qla_host_t *vha)
>   	__be32 *q;
>   
>   	memset(ha->init_cb, 0, ha->init_cb_size);
> -	sz = min_t(int, sizeof(struct fc_els_csp), ha->init_cb_size);
> +	sz = min_t(int, sizeof(struct fc_els_flogi), ha->init_cb_size);
>   	rval = qla24xx_get_port_login_templ(vha, ha->init_cb_dma,
>   					    ha->init_cb, sz);
>   	if (rval != QLA_SUCCESS) {

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

Patch

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 62087ce51b3f..d4df07aaa0ab 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -5607,7 +5607,7 @@  static void qla_get_login_template(scsi_qla_host_t *vha)
 	__be32 *q;
 
 	memset(ha->init_cb, 0, ha->init_cb_size);
-	sz = min_t(int, sizeof(struct fc_els_csp), ha->init_cb_size);
+	sz = min_t(int, sizeof(struct fc_els_flogi), ha->init_cb_size);
 	rval = qla24xx_get_port_login_templ(vha, ha->init_cb_dma,
 					    ha->init_cb, sz);
 	if (rval != QLA_SUCCESS) {