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/bionic/vfork.S b/libc/arch-x86/bionic/vfork.S index ca7af0f..5c71b8d 100644 --- a/libc/arch-x86/bionic/vfork.S +++ b/libc/arch-x86/bionic/vfork.S
@@ -34,6 +34,12 @@ popl %ecx // Grab the return address. .cfi_adjust_cfa_offset 4 .cfi_rel_offset ecx, 0 + + // __get_tls()[TLS_SLOT_THREAD_ID]->cached_pid_ = 0 + movl %gs:0, %eax + movl 4(%eax), %eax + movl $0, 12(%eax) + movl $__NR_vfork, %eax int $0x80 cmpl $-MAX_ERRNO, %eax