summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/acct.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/acct.c b/kernel/acct.c
index 521dfa5..7ff5339 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -482,7 +482,9 @@ static void do_acct_process(struct file *file)
#endif
#if ACCT_VERSION==3
ac.ac_pid = current->tgid;
- ac.ac_ppid = current->real_parent->tgid;
+ rcu_read_lock();
+ ac.ac_ppid = rcu_dereference(current->real_parent)->tgid;
+ rcu_read_unlock();
#endif
spin_lock_irq(&current->sighand->siglock);
OpenPOWER on IntegriCloud