[PATCH 19/22] ntdll: Use shared loader locking in LdrDisableThreadCalloutsForDll().

Paul Gofman pgofman at codeweavers.com
Fri Oct 1 13:21:04 CDT 2021


Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
 dlls/ntdll/loader.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 77d7a292569..2ef49691f46 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -1913,13 +1913,16 @@ NTSTATUS WINAPI LdrDisableThreadCalloutsForDll(HMODULE hModule)
     WINE_MODREF *wm;
     NTSTATUS    ret = STATUS_SUCCESS;
 
-    lock_loader_exclusive();
+    lock_loader_shared();
 
     wm = get_modref( hModule );
+
+    lock_module_info();
     if (!wm || wm->ldr.TlsIndex != -1)
         ret = STATUS_DLL_NOT_FOUND;
     else
         wm->ldr.Flags |= LDR_NO_DLL_CALLS;
+    unlock_module_info();
 
     unlock_loader();
 
-- 
2.31.1




More information about the wine-devel mailing list