Alexandre Julliard : ntdll: Don' t try to unmap system views on the server side.

Alexandre Julliard julliard at winehq.org
Mon Oct 9 14:28:40 CDT 2017


Module: wine
Branch: master
Commit: 49d3cac9ce7cf6bed7f56b789618f870f5eef1da
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=49d3cac9ce7cf6bed7f56b789618f870f5eef1da

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Oct  9 10:44:50 2017 +0200

ntdll: Don't try to unmap system views on the server side.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/virtual.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 1b835bc..d28b138 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -3074,13 +3074,18 @@ 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 );
+            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 );
+            else FIXME( "failed to unmap %p %x\n", view->base, status );
         }
-        SERVER_END_REQ;
-        if (!status) delete_view( view );
+        else delete_view( view );
     }
     server_leave_uninterrupted_section( &csVirtual, &sigset );
     return status;




More information about the wine-cvs mailing list