Re: [PATCH 1/5] md: Flush workqueue md_rdev_misc_wq in md_alloc()

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

 



On Thu, Aug 11, 2022 at 10:14 AM Logan Gunthorpe <logang@xxxxxxxxxxxx> wrote:
>
> From: David Sloan <david.sloan@xxxxxxxxxxxxx>
>
> A race condition still exists when removing and re-creating md devices
> in test cases. However, it is only seen on some setups.
>
> The race condition was tracked down to a reference still being held
> to the kobject by the rdev in the md_rdev_misc_wq which will be released
> in rdev_delayed_delete().
>
> md_alloc() waits for previous deletions by waiting on the md_misc_wq,
> but the md_rdev_misc_wq may still be holding a reference to a recently
> removed device.
>
> To fix this, also flush the md_rdev_misc_wq in md_alloc().
>
> Signed-off-by: David Sloan <david.sloan@xxxxxxxxxxxxx>
> [logang@xxxxxxxxxxxx: rewrote commit message]
> Signed-off-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>

Applied 1/5 to md-fixes.

Thanks!
Song



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux