Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
d35abdb2
Commit
d35abdb2
authored
Jun 30, 2012
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hold task_lock around checks in keyctl
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
6120d3db
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
security/keys/keyctl.c
security/keys/keyctl.c
+2
-0
No files found.
security/keys/keyctl.c
View file @
d35abdb2
...
@@ -1486,6 +1486,7 @@ long keyctl_session_to_parent(void)
...
@@ -1486,6 +1486,7 @@ long keyctl_session_to_parent(void)
oldwork
=
NULL
;
oldwork
=
NULL
;
parent
=
me
->
real_parent
;
parent
=
me
->
real_parent
;
task_lock
(
parent
);
/* the parent mustn't be init and mustn't be a kernel thread */
/* the parent mustn't be init and mustn't be a kernel thread */
if
(
parent
->
pid
<=
1
||
!
parent
->
mm
)
if
(
parent
->
pid
<=
1
||
!
parent
->
mm
)
goto
unlock
;
goto
unlock
;
...
@@ -1529,6 +1530,7 @@ long keyctl_session_to_parent(void)
...
@@ -1529,6 +1530,7 @@ long keyctl_session_to_parent(void)
if
(
!
ret
)
if
(
!
ret
)
newwork
=
NULL
;
newwork
=
NULL
;
unlock:
unlock:
task_unlock
(
parent
);
write_unlock_irq
(
&
tasklist_lock
);
write_unlock_irq
(
&
tasklist_lock
);
rcu_read_unlock
();
rcu_read_unlock
();
if
(
oldwork
)
if
(
oldwork
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment