RE: [PATCH 2/2] scsi: ufs: Fix a deadlock in the error handler

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

 



> > Fix this lockup by making ufshcd_exec_dev_cmd() allocate a reserved
> > request.
> 
> It is worth noting that the error handler itself could always find
> a free slot, either by waiting for one, or by taking the reset
> path which clears all slots.
> 
> However, the problem would then be places that cause the error
> handler to wait, like sysfs (due to hba->host_sem), exception
> event handler (due to cancel_work_sync(&hba->eeh_work)), or
> potentially any other dev cmd user (due to hba->dev_cmd.lock).
Instead of the reserved tag mechanism, since we are in reset-and-restore path,
how about forcing one slot out if the doorbell is full?

> 
> Once the layering and locking is sorted out, it might be possible
> to get rid of the reserved tag, if there was a performance
> benefit.
> 
> More to the point though, for the reasons above, you need to
> change the other dev cmd path also
> i.e. ufshcd_issue_devman_upiu_cmd()
Maybe we can just return ebusy if ufshcd_eh_in_progress()?

Thanks,
Avri




[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