linux/drivers/scsi/qedi
Runyu Xiao 85de8b3a5e scsi: qedi: Initialize callback state before registration
qedi_get_protocol_tlv_data() can be called asynchronously by QED after
qedi_ops->register_ops(). It takes stats_lock and reads ll2_mtu, but
__qedi_probe() currently registers the callback before initializing the
mutex and assigning the default MTU on the normal probe path.

Initialize the callback-visible state before registering qedi_cb_ops. Keep
the recovery path from reinitializing state because it reuses the existing
qedi context.

Fixes: 3cc5746e5a ("scsi: qedi: Initialize the stats mutex lock")
Cc: stable@vger.kernel.org
Assisted-by: LLM Codex
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Link: https://patch.msgid.link/20260910092405.1300129-1-runyu.xiao@seu.edu.cn
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-09-25 22:09:34 -04:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
qedi_dbg.c scsi: qedi: Remove unused sysfs functions 2025-04-21 21:51:08 -04:00
qedi_dbg.h scsi: qedi: Remove unused sysfs functions 2025-04-21 21:51:08 -04:00
qedi_debugfs.c scsi: qedi: Fix crash while reading debugfs attribute 2024-04-24 21:09:08 -04:00
qedi_fw_api.c qed: Remove e4_ and _e4 from FW HSI 2021-10-04 12:55:48 +01:00
qedi_fw_iscsi.h qed: Remove e4_ and _e4 from FW HSI 2021-10-04 12:55:48 +01:00
qedi_fw_scsi.h
qedi_fw.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
qedi_gbl.h scsi: qedi: Remove unused qedi_get_proto_itt() 2025-04-21 21:51:09 -04:00
qedi_hsi.h
qedi_iscsi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
qedi_iscsi.h scsi: qedi: Fix cmd_cleanup_cmpl counter mismatch issue 2021-12-06 22:00:54 -05:00
qedi_main.c scsi: qedi: Initialize callback state before registration 2026-09-25 22:09:34 -04:00
qedi_nvm_iscsi_cfg.h
qedi_sysfs.c scsi: qedi: Switch to attribute groups 2021-10-16 21:45:58 -04:00
qedi_version.h
qedi.h scsi: qedi: Fix cleanup session block/unblock use 2021-06-02 01:28:23 -04:00