|
@@ -1272,6 +1272,7 @@ long keyctl_session_to_parent(void)
|
|
keyring_r = NULL;
|
|
keyring_r = NULL;
|
|
|
|
|
|
me = current;
|
|
me = current;
|
|
|
|
+ rcu_read_lock();
|
|
write_lock_irq(&tasklist_lock);
|
|
write_lock_irq(&tasklist_lock);
|
|
|
|
|
|
parent = me->real_parent;
|
|
parent = me->real_parent;
|
|
@@ -1319,6 +1320,7 @@ long keyctl_session_to_parent(void)
|
|
set_ti_thread_flag(task_thread_info(parent), TIF_NOTIFY_RESUME);
|
|
set_ti_thread_flag(task_thread_info(parent), TIF_NOTIFY_RESUME);
|
|
|
|
|
|
write_unlock_irq(&tasklist_lock);
|
|
write_unlock_irq(&tasklist_lock);
|
|
|
|
+ rcu_read_unlock();
|
|
if (oldcred)
|
|
if (oldcred)
|
|
put_cred(oldcred);
|
|
put_cred(oldcred);
|
|
return 0;
|
|
return 0;
|
|
@@ -1327,6 +1329,7 @@ already_same:
|
|
ret = 0;
|
|
ret = 0;
|
|
not_permitted:
|
|
not_permitted:
|
|
write_unlock_irq(&tasklist_lock);
|
|
write_unlock_irq(&tasklist_lock);
|
|
|
|
+ rcu_read_unlock();
|
|
put_cred(cred);
|
|
put_cred(cred);
|
|
return ret;
|
|
return ret;
|
|
|
|
|