projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f08ab9e
)
apply vmlock wait to __unmapself in pthread_exit
author
Rich Felker
<dalias@aerifal.cx>
Fri, 10 Apr 2015 07:47:42 +0000
(
03:47
-0400)
committer
Rich Felker
<dalias@aerifal.cx>
Fri, 10 Apr 2015 07:47:42 +0000
(
03:47
-0400)
src/thread/pthread_create.c
patch
|
blob
|
history
diff --git
a/src/thread/pthread_create.c
b/src/thread/pthread_create.c
index 08c5f4f8b910b9faf48293c75149cc54b144e989..33808ce5989af851e8c30da5528188e47f0e716d 100644
(file)
--- a/
src/thread/pthread_create.c
+++ b/
src/thread/pthread_create.c
@@
-108,6
+108,10
@@
_Noreturn void __pthread_exit(void *result)
if (self->robust_list.off)
__syscall(SYS_set_robust_list, 0, 3*sizeof(long));
+ /* Since __unmapself bypasses the normal munmap code path,
+ * explicitly wait for vmlock holders first. */
+ __vm_wait();
+
/* The following call unmaps the thread's stack mapping
* and then exits without touching the stack. */
__unmapself(self->map_base, self->map_size);