elf_core_dump: use rcu_read_lock() to access ->real_parent
commit3b34fc5880a2dcc7e5ed9837ef8d6bae051ab266
authorOleg Nesterov <oleg@redhat.com>
Wed, 17 Jun 2009 23:27:38 +0000 (17 16:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 18 Jun 2009 20:03:52 +0000 (18 13:03 -0700)
tree477b9a29135cc7b8815ce7ce19201bce371c56a1
parent72a1de39f89325a834a8c70b2a0d8f71d919f640
elf_core_dump: use rcu_read_lock() to access ->real_parent

In theory it is not safe to dereference ->parent/real_parent without
tasklist or rcu lock, we can race with re-parenting.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/binfmt_elf.c
fs/binfmt_elf_fdpic.c