Thread (6 messages) 6 messages, 2 authors, 2021-10-01

Re: [PATCH V6 1/3] scsi: ufs: Fix error handler clear ua deadlock

From: Bart Van Assche <bvanassche@acm.org>
Date: 2021-09-30 22:10:11

On 9/30/21 5:42 AM, Adrian Hunter wrote:
There is no guarantee to be able to enter the queue if requests are
blocked. That is because freezing the queue will block entry to the
queue, but freezing also waits for outstanding requests which can make
no progress while the queue is blocked.

That situation can happen when the error handler issues requests to
clear unit attention condition. Requests are blocked if the ufshcd_state is
UFSHCD_STATE_EH_SCHEDULED_FATAL, which can happen as a result of
prior error handler activity. Requests cannot make progress when
ufshcd_state is UFSHCD_STATE_EH_SCHEDULED_FATAL, and only the error
handler can change that, so if the error handler is waiting to enter
the queue and blk_mq_freeze_queue() is waiting for outstanding requests,
they will deadlock.

Fix by issuing REQUEST_SENSE directly avoiding the SCSI queues, in
a similar fashion as other device commands.
Hi Adrian,

Although I appreciate all the work that you have done on this patch, there
is at least one application (the Android Trusty software) that needs the
RPMB unit attention information to work correctly. Hence my request to drop
this patch and to integrate the following patch series in the upstream kernel:
https://lore.kernel.org/linux-scsi/aacbec00-34e8-f082-51a5-15391bf99710@acm.org/T/#t (local)

Thanks,

Bart.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help