Re: [PATCH v3 15/18] scsi: ufs: Request sense data asynchronously

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

 



On Wed, 2021-07-21 at 20:34 -0700, Bart Van Assche wrote:
> Clearing a unit attention synchronously from inside the UFS error
> handler
> may trigger the following deadlock:
> - ufshcd_err_handler() calls ufshcd_err_handling_unprepare() and the
> latter
>   function calls ufshcd_clear_ua_wluns().
> - ufshcd_clear_ua_wluns() submits a REQUEST SENSE command and that
> command
>   activates the SCSI error handler.
> - The SCSI error handler calls ufshcd_host_reset_and_restore().
> - ufshcd_host_reset_and_restore() executes the following code:
>   ufshcd_schedule_eh_work(hba);
>   flush_work(&hba->eh_work);
> 
> This sequence results in a deadlock (circular wait). Fix this by
> requesting
> sense data asynchronously.
> 
> Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Cc: Stanley Chu <stanley.chu@xxxxxxxxxxxx>
> Cc: Can Guo <cang@xxxxxxxxxxxxxx>
> Cc: Asutosh Das <asutoshd@xxxxxxxxxxxxxx>
> Cc: Avri Altman <avri.altman@xxxxxxx>
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>

Reviewed-by: Bean Huo <beanhuo@xxxxxxxxxx>




[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