summaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-12-27 09:14:45 +0000
committerJakub Jelinek <jakub@redhat.com>2007-12-27 09:14:45 +0000
commitf163450fc0969ebd6f63c5d9bd059f6f0d107d75 (patch)
tree1d7cb198dead8b16362e6ed6b8f71f52fb50a0d0 /nptl
parentc5899b63ebb80de72b909a475e1dd41b99a4080c (diff)
Updated to fedora-glibc-20071227T0908cvs/fedora-glibc-2_7_90-2
Diffstat (limited to 'nptl')
-rw-r--r--nptl/ChangeLog7
-rw-r--r--nptl/allocatestack.c2
-rw-r--r--nptl/sysdeps/x86_64/pthreaddef.h7
3 files changed, 11 insertions, 5 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 0885fe6d9e..e3fb8df949 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,10 @@
+2007-12-14 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
+ parameter. Passed it as permission to mmap.
+ * allocatestack.c (allocate_stack): Pass prot as second parameter
+ to ARCH_RETRY_MMAP.
+
2007-12-12 Ulrich Drepper <drepper@redhat.com>
* tst-basic7.c: Allocate memory for the stack.
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index f75599c668..66128e455b 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -459,7 +459,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
if (__builtin_expect (mem == MAP_FAILED, 0))
{
#ifdef ARCH_RETRY_MMAP
- mem = ARCH_RETRY_MMAP (size);
+ mem = ARCH_RETRY_MMAP (size, prot);
if (__builtin_expect (mem == MAP_FAILED, 0))
#endif
{
diff --git a/nptl/sysdeps/x86_64/pthreaddef.h b/nptl/sysdeps/x86_64/pthreaddef.h
index 27896a445c..0195bc928f 100644
--- a/nptl/sysdeps/x86_64/pthreaddef.h
+++ b/nptl/sysdeps/x86_64/pthreaddef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -42,9 +42,8 @@
/* If it is not possible to allocate memory there retry without that
flag. */
-#define ARCH_RETRY_MMAP(size) \
- mmap (NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, \
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)
+#define ARCH_RETRY_MMAP(size, prot) \
+ mmap (NULL, size, prot, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)
/* XXX Until we have a better place keep the definitions here. */