Re: [PATCH v3 6/7] scsi: ufs: core: Fix double release in ufshcd_abort()
From: Bart Van Assche
Date: Tue Oct 20 2026 - 16:19:39 EST
On 10/20/26 1:21 AM, Stanley Jhu wrote:
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 111f5805f178..ee898f4a5bb1 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -8176,7 +8176,9 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
dev_err(hba->dev,
"%s: cmd was completed, but without a notifying intr, tag = %d",
__func__, tag);
- __ufshcd_transfer_req_compl(hba, 1UL << tag);
+ if (ufshcd_clear_outstanding_reqs(hba, BIT(tag)) &&
+ ufshcd_is_scsi_cmd(cmd))
+ ufshcd_release_scsi_cmd(hba, cmd);
goto release;
}
This change is incomplete. "err = SUCCESS" is missing above "goto
release". Without this change, the SCSI error handler will escalate
error handling unnecessarily to the next level.
Bart.