[PATCH 10/22] ntdll: Downgrade loader lock to shared when calling LDR notifications.
Paul Gofman
pgofman at codeweavers.com
Fri Oct 1 13:20:55 CDT 2021
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
dlls/ntdll/loader.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index a7a7089ca66..dae4ce13b44 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -727,6 +727,7 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
data.Loaded.DllBase = module->DllBase;
data.Loaded.SizeOfImage = module->SizeOfImage;
+ lock_loader_downgrade_exclusive();
RtlEnterCriticalSection( &loader_section );
RtlEnterCriticalSection( &ldr_notifications_section );
LIST_FOR_EACH_ENTRY_SAFE( notify, notify_next, &ldr_notifications, struct ldr_notification, entry )
@@ -741,6 +742,7 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module )
}
RtlLeaveCriticalSection( &ldr_notifications_section );
RtlLeaveCriticalSection( &loader_section );
+ lock_loader_restore_exclusive();
}
/*************************************************************************
--
2.31.1
More information about the wine-devel
mailing list