Commit 8111162
dm-raid: fix lockdep waring in "pers->hot_add_disk"
BugLink: https://bugs.launchpad.net/bugs/2065435
[ Upstream commit 95009ae ]
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]
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Manuel Diewald <[email protected]>
Signed-off-by: Roxana Nicolescu <[email protected]>1 parent d563f4c commit 8111162
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4049 | 4049 | | |
4050 | 4050 | | |
4051 | 4051 | | |
| 4052 | + | |
4052 | 4053 | | |
| 4054 | + | |
4053 | 4055 | | |
4054 | 4056 | | |
4055 | 4057 | | |
| |||
0 commit comments