diff options
Diffstat (limited to 'security/keys/keyctl.c')
-rw-r--r-- | security/keys/keyctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index 3e4053a217c3..0f947bcbad46 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c | |||
@@ -1524,7 +1524,8 @@ long keyctl_session_to_parent(void) | |||
1524 | 1524 | ||
1525 | ret = -EPERM; | 1525 | ret = -EPERM; |
1526 | oldwork = NULL; | 1526 | oldwork = NULL; |
1527 | parent = me->real_parent; | 1527 | parent = rcu_dereference_protected(me->real_parent, |
1528 | lockdep_is_held(&tasklist_lock)); | ||
1528 | 1529 | ||
1529 | /* the parent mustn't be init and mustn't be a kernel thread */ | 1530 | /* the parent mustn't be init and mustn't be a kernel thread */ |
1530 | if (parent->pid <= 1 || !parent->mm) | 1531 | if (parent->pid <= 1 || !parent->mm) |