commit | 5891abdc66aa9578395bc8b8e5740f629a2694b7 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Fri Aug 07 18:27:47 2015 -0700 |
committer | Elliott Hughes <enh@google.com> | Fri Aug 07 19:44:12 2015 -0700 |
tree | 7ce00a1c6da021bf09535dd0d287e76c9efd31fa | |
parent | e80369ab0c484a99925a49a81ab0675538fab38a [diff] [blame] |
Invalidate cached pid in vfork. Bug: http://b/23008979 Change-Id: I1dd900ac988cdbe10aad3abc53240c5d352891d5
diff --git a/libc/arch-x86_64/bionic/vfork.S b/libc/arch-x86_64/bionic/vfork.S index 129f1db..3b32c66 100644 --- a/libc/arch-x86_64/bionic/vfork.S +++ b/libc/arch-x86_64/bionic/vfork.S
@@ -32,6 +32,12 @@ ENTRY(vfork) popq %rdi // Grab the return address. + + // __get_tls()[TLS_SLOT_THREAD_ID]->cached_pid_ = 0 + mov %fs:0, %rax + mov 8(%rax), %rax + movl $0, 20(%rax) + movl $__NR_vfork, %eax syscall pushq %rdi // Restore the return address.