Re: [PATCH v5 0/6] scsi: ufs: core: Factor hba->outstanding_reqs helper and fix double completions

From: Martin K. Petersen (Oracle)

Date: Wed Oct 28 2026 - 22:06:43 EST


On Thu, 22 Oct 2026 11:44:37 +0800, Stanley Jhu wrote:

> In Single Doorbell (SDB) mode, multiple completion and error handling
> paths can race on the same transfer request when bits in
> hba->outstanding_reqs are not claimed atomically with completing the
> request. A stale bit in hba->outstanding_reqs lets a later poll or
> reset complete the request again and unmap its DMA buffers twice.
>
> Patch 1 removes a WARN_ONCE() in ufshcd_poll() whose condition is always
> false.
>
> [...]

Applied to 7.4/scsi-queue, thanks!

[1/6] scsi: ufs: core: Remove an always-false WARN_ONCE()
https://git.kernel.org/mkp/scsi/c/cd37a69c367b
[2/6] scsi: ufs: core: Add a helper for clearing hba->outstanding_reqs
https://git.kernel.org/mkp/scsi/c/22d14117ec18
[3/6] scsi: ufs: core: Fix double completion in ufshcd_clear_lu_cmds()
https://git.kernel.org/mkp/scsi/c/6b9c1f49971e
[4/6] scsi: ufs: core: Fix double release in ufshcd_eh_timed_out()
https://git.kernel.org/mkp/scsi/c/3a7e551ae4bc
[5/6] scsi: ufs: core: Remove completed-without-interrupt path in ufshcd_abort()
https://git.kernel.org/mkp/scsi/c/7cfdfdd65579
[6/6] scsi: ufs: core: Do not release a reserved request in ufshcd_abort()
https://git.kernel.org/mkp/scsi/c/eb2c4847a1cb

--
Martin K. Petersen