mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added patch to ensure NtUnmapViewOfSection doesn't fail when trying to unmap builtin view.
This commit is contained in:
parent
12802a92b6
commit
1be574ad0d
@ -0,0 +1,45 @@
|
||||
From 3748f23616bf25fb2f599f7896d8437614918ce0 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 9 Oct 2017 14:18:30 +0200
|
||||
Subject: ntdll: Don't fail in NtUnmapViewOfSection when trying to unmap
|
||||
builtin view.
|
||||
|
||||
Fixes a regression introduced in a557934c76c0e0bed6b73e5c8f79a0df059ff2de.
|
||||
---
|
||||
dlls/ntdll/virtual.c | 18 +++++++++++++-----
|
||||
1 file changed, 13 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
|
||||
index f33579840a2..04862237bb9 100644
|
||||
--- a/dlls/ntdll/virtual.c
|
||||
+++ b/dlls/ntdll/virtual.c
|
||||
@@ -3071,13 +3071,21 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
|
||||
server_enter_uninterrupted_section( &csVirtual, &sigset );
|
||||
if ((view = VIRTUAL_FindView( addr, 0 )) && !is_view_valloc( view ))
|
||||
{
|
||||
- SERVER_START_REQ( unmap_view )
|
||||
+ if (view->protect & VPROT_SYSTEM)
|
||||
{
|
||||
- req->base = wine_server_client_ptr( view->base );
|
||||
- status = wine_server_call( req );
|
||||
+ delete_view( view );
|
||||
+ status = STATUS_SUCCESS;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ SERVER_START_REQ( unmap_view )
|
||||
+ {
|
||||
+ req->base = wine_server_client_ptr( view->base );
|
||||
+ status = wine_server_call( req );
|
||||
+ }
|
||||
+ SERVER_END_REQ;
|
||||
+ if (!status) delete_view( view );
|
||||
}
|
||||
- SERVER_END_REQ;
|
||||
- if (!status) delete_view( view );
|
||||
}
|
||||
server_leave_uninterrupted_section( &csVirtual, &sigset );
|
||||
return status;
|
||||
--
|
||||
2.14.1
|
||||
|
1
patches/ntdll-NtUnmapViewOfSection/definition
Normal file
1
patches/ntdll-NtUnmapViewOfSection/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [43860] Don't fail in NtUnmapViewOfSection when trying to unmap builtin view
|
@ -273,6 +273,7 @@ patch_enable_all ()
|
||||
enable_ntdll_NtSetInformationToken="$1"
|
||||
enable_ntdll_NtSetLdtEntries="$1"
|
||||
enable_ntdll_NtSuspendProcess="$1"
|
||||
enable_ntdll_NtUnmapViewOfSection="$1"
|
||||
enable_ntdll_Pipe_SpecialCharacters="$1"
|
||||
enable_ntdll_ProcessImageFileNameWin32="$1"
|
||||
enable_ntdll_ProcessPriorityClass="$1"
|
||||
@ -1102,6 +1103,9 @@ patch_enable ()
|
||||
ntdll-NtSuspendProcess)
|
||||
enable_ntdll_NtSuspendProcess="$2"
|
||||
;;
|
||||
ntdll-NtUnmapViewOfSection)
|
||||
enable_ntdll_NtUnmapViewOfSection="$2"
|
||||
;;
|
||||
ntdll-Pipe_SpecialCharacters)
|
||||
enable_ntdll_Pipe_SpecialCharacters="$2"
|
||||
;;
|
||||
@ -6816,6 +6820,21 @@ if test "$enable_ntdll_NtSuspendProcess" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-NtUnmapViewOfSection
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#43860] Don't fail in NtUnmapViewOfSection when trying to unmap builtin view
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ntdll/virtual.c
|
||||
# |
|
||||
if test "$enable_ntdll_NtUnmapViewOfSection" -eq 1; then
|
||||
patch_apply ntdll-NtUnmapViewOfSection/0001-ntdll-Don-t-fail-in-NtUnmapViewOfSection-when-trying.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Don'\''t fail in NtUnmapViewOfSection when trying to unmap builtin view.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-ProcessImageFileNameWin32
|
||||
# |
|
||||
# | Modified files:
|
||||
|
Loading…
x
Reference in New Issue
Block a user