Commit 95009ae
dm-raid: fix lockdep waring in "pers->hot_add_disk"
The lockdep assert is added by commit a448af2 ("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: 9092c02 ("DM RAID: Add ability to restore transiently failed devices on resume")
Fixes: a448af2 ("md/raid10: remove rcu protection to access rdev from conf")
Cc: [email protected] # v6.7+
Signed-off-by: Yu Kuai <[email protected]>
Signed-off-by: Xiao Ni <[email protected]>
Acked-by: Mike Snitzer <[email protected]>
Signed-off-by: Song Liu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent 41425f9 commit 95009ae
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4091 | 4091 | | |
4092 | 4092 | | |
4093 | 4093 | | |
| 4094 | + | |
4094 | 4095 | | |
| 4096 | + | |
4095 | 4097 | | |
4096 | 4098 | | |
4097 | 4099 | | |
| |||
0 commit comments