Re: [PATCH] ufs: core: Remove scsi host only if added

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/27/24 1:51 AM, 김경률 wrote:
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's been added, set the
scsi_host_added flag to true after adding a scsi host and check whether
it's set or not before removing the scsi host.

Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux