diff options
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/ChangeLog | 3 | ||||
-rw-r--r-- | nptl/allocatestack.c | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index e18c9cac21..30b7d9eb1d 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,5 +1,8 @@ 2003-09-24 Ulrich Drepper <drepper@redhat.com> + * allocatestack.c (__make_stacks_executable): Also change + permission of the currently unused stacks. + * allocatestack.c (change_stack_perm): Split out from __make_stacks_executable. (allocate_stack): If the required permission changed between the time 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) |