Signed-off-by: Paul Gofman pgofman@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 c4fdfdf414b..bac249bd3d9 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -1590,6 +1590,7 @@ static void call_tls_callbacks( HMODULE module, UINT reason ) dir = RtlImageDirectoryEntryToData( module, TRUE, IMAGE_DIRECTORY_ENTRY_TLS, &dirsize ); if (!dir || !dir->AddressOfCallBacks) return;
+ lock_loader_downgrade_exclusive(); RtlEnterCriticalSection( &loader_section );
for (callback = (const PIMAGE_TLS_CALLBACK *)dir->AddressOfCallBacks; *callback; callback++) @@ -1612,6 +1613,7 @@ static void call_tls_callbacks( HMODULE module, UINT reason ) }
RtlLeaveCriticalSection( &loader_section ); + lock_loader_restore_exclusive(); }
/*************************************************************************