You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Added patch to ensure NtUnmapViewOfSection doesn't fail when trying to unmap builtin view.
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user