diff options
author | Guoqing Jiang <guoqing.jiang@cloud.ionos.com> | 2022-04-29 11:49:09 +0300 |
---|---|---|
committer | Song Liu <song@kernel.org> | 2022-05-23 09:07:21 +0300 |
commit | 1e267742283a4b5a8ca65755c44166be27e9aa0f (patch) | |
tree | 58e8575c119e1b6b69a440ccfee1efdb69a54611 /drivers/acpi/reboot.c | |
parent | 8b48ec23cc51a4e7c8dbaef5f34ebe67e1a80934 (diff) | |
download | linux-1e267742283a4b5a8ca65755c44166be27e9aa0f.tar.xz |
md: protect md_unregister_thread from reentrancy
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>
Diffstat (limited to 'drivers/acpi/reboot.c')
0 files changed, 0 insertions, 0 deletions