Re: [PATCH v9 2/3] ufs: core: fix error handler process for MCQ abort

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/27/24 12:51 AM, Peter Wang (王信友) wrote:
In this section of the UFSHCI 4.0 specification.
4.4.6 (Informative) Processing Abort in MCQ mode: An Implementation
Example
There are three case for MCQ abort:

1. When the host controller has already sent out the SQE
    and the UFS device has already responded with the
    corresponding response, the CQ Entry will automatically
    increment by 1. This case is the simplest, the SQE
    will have a corresponding CQE for the host to cleanup
    resources.

2. When the host controller has not yet sent out this SQE
   (SQ is not empty), the software can fill in 'nullify' to
   notify the host controller that there is no need to send
   it, and directly fill the corresponding response into the
   CQ with OCS: ABORTED. This scenario is also straightforward,
   the UFS device won't be aware, and only the host controller
   needs to clean up the related resources.

3. When the host controller has already sent out the SQE
    and is waiting for the response from the UFS device (CQE),
    the software can initiate cleanup to notify the host
    controller that there is no need to wait, and directly fill
    the corresponding response into the CQ with OCS: ABORTED.

Hi Peter,

Thank you for having drawn my attention to the above text. Regarding
the code changes included in your previous email, do you agree that the
completion code must not call scsi_done() if the CQE status is ABORTED
and if the SCSI command has been aborted by the SCSI core since in this
case calling scsi_done() could result in a use-after-free?

Thanks,

Bart.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux