aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/keys/keyctl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c
index b2b0998d6abd..3868c6700b58 100644
--- a/security/keys/keyctl.c
+++ b/security/keys/keyctl.c
@@ -1272,6 +1272,7 @@ long keyctl_session_to_parent(void)
1272 keyring_r = NULL; 1272 keyring_r = NULL;
1273 1273
1274 me = current; 1274 me = current;
1275 rcu_read_lock();
1275 write_lock_irq(&tasklist_lock); 1276 write_lock_irq(&tasklist_lock);
1276 1277
1277 parent = me->real_parent; 1278 parent = me->real_parent;
@@ -1319,6 +1320,7 @@ long keyctl_session_to_parent(void)
1319 set_ti_thread_flag(task_thread_info(parent), TIF_NOTIFY_RESUME); 1320 set_ti_thread_flag(task_thread_info(parent), TIF_NOTIFY_RESUME);
1320 1321
1321 write_unlock_irq(&tasklist_lock); 1322 write_unlock_irq(&tasklist_lock);
1323 rcu_read_unlock();
1322 if (oldcred) 1324 if (oldcred)
1323 put_cred(oldcred); 1325 put_cred(oldcred);
1324 return 0; 1326 return 0;
@@ -1327,6 +1329,7 @@ already_same:
1327 ret = 0; 1329 ret = 0;
1328not_permitted: 1330not_permitted:
1329 write_unlock_irq(&tasklist_lock); 1331 write_unlock_irq(&tasklist_lock);
1332 rcu_read_unlock();
1330 put_cred(cred); 1333 put_cred(cred);
1331 return ret; 1334 return ret;
1332 1335