mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
sys_getppid: add missing rcu_dereference
In order to safely dereference current->real_parent inside an rcu_read_lock, we need an rcu_dereference. Signed-off-by: Mandeep Singh Baines <msb@chromium.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Kees Cook <keescook@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
1cee22b7f3
commit
031af165b1
1 changed files with 1 additions and 1 deletions
|
@ -1368,7 +1368,7 @@ SYSCALL_DEFINE0(getppid)
|
|||
int pid;
|
||||
|
||||
rcu_read_lock();
|
||||
pid = task_tgid_vnr(current->real_parent);
|
||||
pid = task_tgid_vnr(rcu_dereference(current->real_parent));
|
||||
rcu_read_unlock();
|
||||
|
||||
return pid;
|
||||
|
|
Loading…
Reference in a new issue