summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2023-11-29 10:02:34 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-25 15:44:46 -0800
commitc4c2345214b66e2505a26fd2ea58839dd7a1d48d (patch)
treed0a4c6299bfc8c144bdd48b1b2231270b01ab64a /arch
parent8a6b020e24ec70c29e2e901e412ce71e4b6246cb (diff)
downloadlinux-stable-c4c2345214b66e2505a26fd2ea58839dd7a1d48d.tar.gz
linux-stable-c4c2345214b66e2505a26fd2ea58839dd7a1d48d.tar.bz2
linux-stable-c4c2345214b66e2505a26fd2ea58839dd7a1d48d.zip
md: synchronize flush io with array reconfiguration
[ Upstream commit fa2bbff7b0b4e211fec5e5686ef96350690597b5 ] Currently rcu is used to protect iterating rdev from submit_flushes(): submit_flushes remove_and_add_spares synchronize_rcu pers->hot_remove_disk() rcu_read_lock() rdev_for_each_rcu if (rdev->raid_disk >= 0) rdev->radi_disk = -1; atomic_inc(&rdev->nr_pending) rcu_read_unlock() bi = bio_alloc_bioset() bi->bi_end_io = md_end_flush bi->private = rdev submit_bio // issue io for removed rdev Fix this problem by grabbing 'acive_io' before iterating rdev, make sure that remove_and_add_spares() won't concurrent with submit_flushes(). Fixes: a2826aa92e2e ("md: support barrier requests on all personalities.") Signed-off-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Song Liu <song@kernel.org> Link: https://lore.kernel.org/r/20231129020234.1586910-1-yukuai1@huaweicloud.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions