From 69c9fa045bce5e125e2e4525eb62ec58965e92f5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 25 Sep 2003 03:31:59 +0000 Subject: Update. * sysdeps/unix/sysv/linux/dl-execstack.c (_dl_make_stack_executable): Remember that we changed the permission. --- nptl/allocatestack.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'nptl/allocatestack.c') diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index 24292e7295..c82b36ede0 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -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) -- cgit v1.2.3