Re: [PATCH] md: use RCU lock to protect traversal in md_spares_need_change()

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

 



On Thu, Jan 4, 2024 at 5:39 AM Li Lingfeng <lilingfeng@xxxxxxxxxxxxxxx> wrote:
>
> From: Li Lingfeng <lilingfeng3@xxxxxxxxxx>
>
> Since md_start_sync() will be called without the protect of mddev_lock,
> and it can run concurrently with array reconfiguration, traversal of rdev
> in it should be protected by RCU lock.
> Commit bc08041b32ab ("md: suspend array in md_start_sync() if array need
> reconfiguration") added md_spares_need_change() to md_start_sync(),
> casusing use of rdev without any protection.
> Fix this by adding RCU lock in md_spares_need_change().
>
> Fixes: bc08041b32ab ("md: suspend array in md_start_sync() if array need reconfiguration")
> Signed-off-by: Li Lingfeng <lilingfeng3@xxxxxxxxxx>

Looks good to me. Applied to md-tmp-6.9.

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