Re: [PATCH] scsi: target: tcmu: Avoid holding XArray lock when calling lock_page

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

 



On Tue, 17 May 2022 21:29:13 +0200, Bodo Stroesser wrote:

> In tcmu_blocks_release, lock_page() is called to prevent a race causing
> possible data corruption. Since lock_page() might sleep, calling it
> while holding XArray lock is a bug.
> 
> To fix the bug switch to XArray normal API by replacing the xas_for_each
> with xa_for_each_range. Since normal API does its own handling of
> XArray locking, now the xas_lock and xas_unlock around the loop are
> obsolete.
> 
> [...]

Applied to 5.19/scsi-queue, thanks!

[1/1] scsi: target: tcmu: Avoid holding XArray lock when calling lock_page
      https://git.kernel.org/mkp/scsi/c/325d5c5fb216

-- 
Martin K. Petersen	Oracle Linux Engineering



[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