summaryrefslogtreecommitdiff
path: root/scripts/dummy-tools/python3
diff options
context:
space:
mode:
authorStanley Jhu <stanleyjhu@google.com>2026-10-22 11:44:41 +0800
committerMartin K. Petersen (Oracle) <mkp@kernel.org>2026-10-23 23:16:41 -0400
commit3a7e551ae4bcc53f271fc15ab8e930598e28dad8 (patch)
tree9ff4bb950d0299c190c0105195579900cee975cf /scripts/dummy-tools/python3
parent6b9c1f49971e4dfe8b8916f0527d30e97c15f234 (diff)
scsi: ufs: core: Fix double release in ufshcd_eh_timed_out()
In SDB mode, a command that times out during a power management operation can be released twice: 1. The command times out while its normal completion is running. 2. The completion path clears BIT(rq->tag) in hba->outstanding_reqs and releases the command. It has not called scsi_done() yet, so SCMD_STATE_COMPLETE is still clear. 3. ufshcd_eh_timed_out() recovers the link, sees SCMD_STATE_COMPLETE clear, clears BIT(rq->tag) in hba->outstanding_reqs without checking whether it was still set, and releases the same command a second time. Return SCSI_EH_DONE when ufshcd_clear_outstanding_reqs() returns 0, as another path has already claimed the command. Fixes: 01d5e237b339 ("scsi: ufs: core: Handle PM commands timeout before SCSI EH") Cc: stable@vger.kernel.org Reviewed-by: Peter Wang <peter.wang@mediatek.com> Signed-off-by: Stanley Jhu <stanleyjhu@google.com> Reviewed-by: Bean Huo <beanhuo@micron.cmo> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20261022034443.3034432-5-stanleyjhu@google.com Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'scripts/dummy-tools/python3')
0 files changed, 0 insertions, 0 deletions