Files
linux/drivers/md
Guoqing Jiang fcf2aaf9b9 md: protect md_unregister_thread from reentrancy
[ Upstream commit 1e26774228 ]

Generally, the md_unregister_thread is called with reconfig_mutex, but
raid_message in dm-raid doesn't hold reconfig_mutex to unregister thread,
so md_unregister_thread can be called simulitaneously from two call sites
in theory.

Then after previous commit which remove the protection of reconfig_mutex
for md_unregister_thread completely, the potential issue could be worse
than before.

Let's take pers_lock at the beginning of function to ensure reentrancy.

Reported-by: Donald Buczek <buczek@molgen.mpg.de>
Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-29 09:26:24 +09:00
..
2014-01-14 23:23:03 -05:00
2017-01-31 10:45:54 -08:00
2016-08-07 14:41:02 -06:00
2016-08-07 14:41:02 -06:00
2016-01-20 13:52:20 -08:00
2017-10-21 17:21:35 +02:00
2016-09-21 09:09:44 -07:00
2016-08-07 14:41:02 -06:00
2015-08-13 12:31:57 -06:00