* [PATCH 2/2] qla2xxx: Initialize vha->unknown_atio_[list, work] for NPIV hosts
@ 2022-11-15 9:38 Gleb Chesnokov
2022-11-26 0:36 ` Martin K. Petersen
2022-12-01 3:45 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Gleb Chesnokov @ 2022-11-15 9:38 UTC (permalink / raw)
To: linux-scsi
Initialization of vha->unknown_atio_list and vha->unknown_atio_work
only happens for base_vha in qla_probe_one_stage1(). But there is no
initialization for NPIV hosts that are created in qla24xx_vport_create().
This causes a crash when trying to access these NPIV host fields.
Fix this by adding initialization to qla_vport_create().
Signed-off-by: Gleb Chesnokov <gleb.chesnokov@scst.dev>
---
drivers/scsi/qla2xxx/qla_target.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/scsi/qla2xxx/qla_target.c
b/drivers/scsi/qla2xxx/qla_target.c
index bb754a950802..548f22705ddc 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -6741,6 +6741,9 @@ qlt_vport_create(struct scsi_qla_host *vha, struct
qla_hw_data *ha)
mutex_init(&vha->vha_tgt.tgt_mutex);
mutex_init(&vha->vha_tgt.tgt_host_action_mutex);
+ INIT_LIST_HEAD(&vha->unknown_atio_list);
+ INIT_DELAYED_WORK(&vha->unknown_atio_work, qlt_unknown_atio_work_fn);
+
qlt_clear_mode(vha);
/*
--
2.38.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] qla2xxx: Initialize vha->unknown_atio_[list, work] for NPIV hosts
2022-11-15 9:38 [PATCH 2/2] qla2xxx: Initialize vha->unknown_atio_[list, work] for NPIV hosts Gleb Chesnokov
@ 2022-11-26 0:36 ` Martin K. Petersen
2022-12-01 3:45 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-11-26 0:36 UTC (permalink / raw)
To: Gleb Chesnokov; +Cc: linux-scsi
Gleb,
> Initialization of vha->unknown_atio_list and vha->unknown_atio_work
> only happens for base_vha in qla_probe_one_stage1(). But there is no
> initialization for NPIV hosts that are created in
> qla24xx_vport_create().
Applied to 6.2/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] qla2xxx: Initialize vha->unknown_atio_[list, work] for NPIV hosts
2022-11-15 9:38 [PATCH 2/2] qla2xxx: Initialize vha->unknown_atio_[list, work] for NPIV hosts Gleb Chesnokov
2022-11-26 0:36 ` Martin K. Petersen
@ 2022-12-01 3:45 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-12-01 3:45 UTC (permalink / raw)
To: linux-scsi, Gleb Chesnokov; +Cc: Martin K . Petersen
On Tue, 15 Nov 2022 12:38:08 +0300, Gleb Chesnokov wrote:
> Initialization of vha->unknown_atio_list and vha->unknown_atio_work
> only happens for base_vha in qla_probe_one_stage1(). But there is no
> initialization for NPIV hosts that are created in qla24xx_vport_create().
>
> This causes a crash when trying to access these NPIV host fields.
>
> Fix this by adding initialization to qla_vport_create().
>
> [...]
Applied to 6.2/scsi-queue, thanks!
[2/2] qla2xxx: Initialize vha->unknown_atio_[list, work] for NPIV hosts
https://git.kernel.org/mkp/scsi/c/95da5e58172c
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-01 3:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-15 9:38 [PATCH 2/2] qla2xxx: Initialize vha->unknown_atio_[list, work] for NPIV hosts Gleb Chesnokov
2022-11-26 0:36 ` Martin K. Petersen
2022-12-01 3:45 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox