diff options
author | Yu Kuai <yukuai3@huawei.com> | 2024-03-05 15:23:06 +0800 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2024-03-05 12:53:33 -0800 |
commit | 95009ae904b1e9dca8db6f649f2d7c18a6e42c75 (patch) | |
tree | 0e48f73e7660319c09322ea940fe5768d7354898 /scripts/gdb/linux/stackdepot.py | |
parent | 41425f96d7aa59bc865f60f5dda3d7697b555677 (diff) |
dm-raid: fix lockdep waring in "pers->hot_add_disk"
The lockdep assert is added by commit a448af25becf ("md/raid10: remove
rcu protection to access rdev from conf") in print_conf(). And I didn't
notice that dm-raid is calling "pers->hot_add_disk" without holding
'reconfig_mutex'.
"pers->hot_add_disk" read and write many fields that is protected by
'reconfig_mutex', and raid_resume() already grab the lock in other
contex. Hence fix this problem by protecting "pers->host_add_disk"
with the lock.
Fixes: 9092c02d9435 ("DM RAID: Add ability to restore transiently failed devices on resume")
Fixes: a448af25becf ("md/raid10: remove rcu protection to access rdev from conf")
Cc: stable@vger.kernel.org # v6.7+
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Xiao Ni <xni@redhat.com>
Acked-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20240305072306.2562024-10-yukuai1@huaweicloud.com
Diffstat (limited to 'scripts/gdb/linux/stackdepot.py')
0 files changed, 0 insertions, 0 deletions