aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorLi Lingfeng <lilingfeng3@huawei.com>2024-01-04 21:36:29 +0800
committerSong Liu <song@kernel.org>2024-02-05 15:23:59 -0800
commit570b9147deb6b07b955b55e06c714ca12a5f3e16 (patch)
treeb1e07d0656496a157ed6cb9083f8acf6639bd3b1 /include/linux/blkdev.h
parentmd: get rdev->mddev with READ_ONCE() (diff)
downloadwireguard-linux-570b9147deb6b07b955b55e06c714ca12a5f3e16.tar.xz
wireguard-linux-570b9147deb6b07b955b55e06c714ca12a5f3e16.zip
md: use RCU lock to protect traversal in md_spares_need_change()
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") Cc: stable@vger.kernel.org # 6.7+ Signed-off-by: Li Lingfeng <lilingfeng3@huawei.com> Signed-off-by: Song Liu <song@kernel.org> Link: https://lore.kernel.org/r/20240104133629.1277517-1-lilingfeng@huaweicloud.com
Diffstat (limited to 'include/linux/blkdev.h')
0 files changed, 0 insertions, 0 deletions