Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: qla2xxx: Initialize vha->unknown_atio_[list, work] for NPIV hosts

Initialization of vha->unknown_atio_list and vha->unknown_atio_work only
happens for base_vha in qlt_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>
Link: https://lore.kernel.org/r/376c89a2-a9ac-bcf9-bf0f-dfe89a02fd4b@scst.dev
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Gleb Chesnokov and committed by
Martin K. Petersen
95da5e58 3620e174

+3
+3
drivers/scsi/qla2xxx/qla_target.c
··· 6741 6741 mutex_init(&vha->vha_tgt.tgt_mutex); 6742 6742 mutex_init(&vha->vha_tgt.tgt_host_action_mutex); 6743 6743 6744 + INIT_LIST_HEAD(&vha->unknown_atio_list); 6745 + INIT_DELAYED_WORK(&vha->unknown_atio_work, qlt_unknown_atio_work_fn); 6746 + 6744 6747 qlt_clear_mode(vha); 6745 6748 6746 6749 /*