Rebase against 63d6dce04746237c1cb39c22914ed666c55178e1.

This commit is contained in:
Sebastian Lackner
2017-10-09 23:37:12 +02:00
parent 1be574ad0d
commit 7dc2c0f2c6
8 changed files with 108 additions and 215 deletions

View File

@@ -1,4 +1,4 @@
From 3748f23616bf25fb2f599f7896d8437614918ce0 Mon Sep 17 00:00:00 2001
From 44d6e7a718e083aba1127ec6927bc6171f5672d8 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
@@ -6,37 +6,23 @@ Subject: ntdll: Don't fail in NtUnmapViewOfSection when trying to unmap
Fixes a regression introduced in a557934c76c0e0bed6b73e5c8f79a0df059ff2de.
---
dlls/ntdll/virtual.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
dlls/ntdll/virtual.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index f33579840a2..04862237bb9 100644
index d28b138e575..70137ec79a4 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 );
@@ -3085,7 +3085,11 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
if (!status) delete_view( view );
else FIXME( "failed to unmap %p %x\n", view->base, status );
}
- else delete_view( view );
+ else
+ {
+ 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;

View File

@@ -1 +1 @@
Fixes: [43860] Don't fail in NtUnmapViewOfSection when trying to unmap builtin view
Fixes: Don't fail in NtUnmapViewOfSection when trying to unmap builtin view