projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6120d3d
)
hold task_lock around checks in keyctl
author
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 30 Jun 2012 07:55:24 +0000
(11:55 +0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 22 Jul 2012 19:58:01 +0000
(23:58 +0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
security/keys/keyctl.c
patch
|
blob
|
blame
|
history
diff --git
a/security/keys/keyctl.c
b/security/keys/keyctl.c
index 0291b3f9397cfa98c4980b83df737ed8ff122ebd..f1b59ae39d7ee1ac1cbf518ecbc5a6644276442f 100644
(file)
--- a/
security/keys/keyctl.c
+++ b/
security/keys/keyctl.c
@@
-1486,6
+1486,7
@@
long keyctl_session_to_parent(void)
oldwork = NULL;
parent = me->real_parent;
+ task_lock(parent);
/* the parent mustn't be init and mustn't be a kernel thread */
if (parent->pid <= 1 || !parent->mm)
goto unlock;
@@
-1529,6
+1530,7
@@
long keyctl_session_to_parent(void)
if (!ret)
newwork = NULL;
unlock:
+ task_unlock(parent);
write_unlock_irq(&tasklist_lock);
rcu_read_unlock();
if (oldwork)