diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c index c268b66f50c..0a4004d2db9 100644 --- a/dlls/ntdll/unix/virtual.c +++ b/dlls/ntdll/unix/virtual.c @@ -1675,21 +1675,7 @@ static BOOL set_vprot( struct file_view *view, void *base, size_t size, BYTE vpr mprotect_range( base, size, 0, 0 ); return TRUE; } - - /* if setting stack guard pages, store the permissions first, as the guard may be - * triggered at any point after mprotect and change the permissions again */ - if ((vprot & VPROT_GUARD) && - (base >= NtCurrentTeb()->DeallocationStack) && - (base < NtCurrentTeb()->Tib.StackBase)) - { - set_page_vprot( base, size, vprot ); - mprotect( base, size, unix_prot ); - return TRUE; - } - - if (mprotect_exec( base, size, unix_prot )) /* FIXME: last error */ - return FALSE; - + if (mprotect_exec( base, size, unix_prot )) return FALSE; set_page_vprot( base, size, vprot ); return TRUE; }