Commit 57d74bb3 authored by Yu Kuai's avatar Yu Kuai Committed by sanglipeng
Browse files

dm raid: protect md_stop() with 'reconfig_mutex'

stable inclusion
from stable-v5.10.190
commit 82ce0ae87a96fde2824cf0727d01c5bef6fb7baa
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I928UI

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=82ce0ae87a96fde2824cf0727d01c5bef6fb7baa



--------------------------------

[ Upstream commit 7d5fff89 ]

__md_stop_writes() and __md_stop() will modify many fields that are
protected by 'reconfig_mutex', and all the callers will grab
'reconfig_mutex' except for md_stop().

Also, update md_stop() to make certain 'reconfig_mutex' is held using
lockdep_assert_held().

Fixes: 9d09e663 ("dm: raid456 basic support")
Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent b2472345
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment