David Sloan 5e8daf906f md: Flush workqueue md_rdev_misc_wq in md_alloc()
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@eideticom.com>
[logang@deltatee.com: rewrote commit message]
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Song Liu <song@kernel.org>
2022-08-24 10:26:35 -07:00
..
2022-05-05 17:31:35 -04:00
2022-05-27 15:49:30 -07:00
2022-05-27 15:49:30 -07:00
2022-07-08 10:46:46 -07:00
2022-08-02 21:08:49 -06:00
2022-08-02 14:38:59 -07:00
2022-05-22 23:07:21 -07:00
2022-03-08 15:16:54 -08:00
2022-07-14 12:14:31 -06:00
2022-03-08 15:16:54 -08:00
2022-03-08 15:16:54 -08:00