Re: [PATCH V2 2/2] scsi: ufs: core: Fix another task management completion race

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

 



On 11/7/21 10:48 PM, Adrian Hunter wrote:
hba->outstanding_tasks, which is read under host_lock spinlock, tells
the interrupt handler what task management tags are in use by the driver.
The doorbell register bits indicate which tags are in use by the hardware.
A doorbell bit that is 0 is because the bit has yet to be set by the
driver, or because the task is complete. It is only possible to
disambiguate the 2 cases, if reading/writing the doorbell register is
synchronized with reading/writing hba->outstanding_tasks.

For that reason, reading REG_UTP_TASK_REQ_DOOR_BELL must be done under
spinlock.

Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>



[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