summaryrefslogtreecommitdiff
path: root/drivers/scsi/pm8001
diff options
context:
space:
mode:
authorKyoungrul Kim <k831.kim@samsung.com>2024-06-27 11:51:04 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2024-07-05 05:51:31 +0300
commit7cbff570dbe8907e23bba06f6414899a0fbb2fcc (patch)
tree357612a028b12730ac8587284c202d243f553ba4 /drivers/scsi/pm8001
parented7dac86f1406d73aed21d0cd1563922031a2fd8 (diff)
downloadlinux-7cbff570dbe8907e23bba06f6414899a0fbb2fcc.tar.xz
scsi: ufs: core: Remove SCSI host only if added
If host tries to remove ufshcd driver from a UFS device it would cause a kernel panic if ufshcd_async_scan fails during ufshcd_probe_hba before adding a SCSI host with scsi_add_host and MCQ is enabled since SCSI host has been defered after MCQ configuration introduced by commit 0cab4023ec7b ("scsi: ufs: core: Defer adding host to SCSI if MCQ is supported"). To guarantee that SCSI host is removed only if it has been added, set the scsi_host_added flag to true after adding a SCSI host and check whether it is set or not before removing it. Signed-off-by: Kyoungrul Kim <k831.kim@samsung.com> Signed-off-by: Minwoo Im <minwoo.im@samsung.com> Link: https://lore.kernel.org/r/20240627085104epcms2p5897a3870ea5c6416aa44f94df6c543d7@epcms2p5 Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/pm8001')
0 files changed, 0 insertions, 0 deletions