Commit e91d19a5 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Remove special case for setting permissions on stack pages.

We are running on the kernel stack at this point. Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 7b4ca95a
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment