Re: [PATCH v2 0/4] scsi: ufs: core: Factor hba->outstanding_reqs helper and fix double completion

From: Peter Wang

Date: Mon Oct 19 2026 - 23:30:31 EST


On Mon, 2026-10-19 at 13:43 -0700, Bart Van Assche wrote:
> Hi Bean,
>
> There are two problems with calling ufshcd_compl_one_cqe() from
> ufshcd_abort():
> * ufshcd_compl_one_cqe() must only be called for SCSI commands while
>    'tag' may refer to a device management command.
> * SCSI commands must not be freed by a SCSI abort handler. Otherwise
>    a use-after-free may be triggered in scmd_eh_abort_handler() when
> it
>    tries to call scsi_queue_insert() or scsi_finish_command().
>
> Bart.

Hi Bart,

So, should we remove the call to __ufshcd_transfer_req_compl from
ufshcd_abort, which was added by commit 
64180742605f (“scsi: ufs: Fix the SCSI abort handler”)?

Thanks.
Peter