1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
* sysdeps/unix/sysv/linux/dl-execstack.c
	(_dl_make_stack_executable): Remember that we changed the permission.
This commit is contained in:
Ulrich Drepper
2003-09-25 03:31:59 +00:00
parent 279f1143af
commit 69c9fa045b
4 changed files with 23 additions and 0 deletions

View File

@ -684,6 +684,20 @@ __make_stacks_executable (void)
break;
}
/* Also change the permission for the currently unused stacks. This
might be wasted time but better spend it here than adding a check
in the fast path. */
list_for_each (runp, &stack_cache)
{
err = change_stack_perm (list_entry (runp, struct pthread, list)
#ifdef NEED_SEPARATE_REGISTER_STACK
, pagemask
#endif
);
if (err != 0)
break;
}
lll_unlock (stack_cache_lock);
if (err == 0)