diff options
| author | David Howells <[email protected]> | 2010-07-29 11:45:55 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2010-07-29 22:16:18 +0000 |
| commit | 8f92054e7ca1d3a3ae50fb42d2253ac8730d9b2a (patch) | |
| tree | 29d1bcf78bf04fe41c7e811f806f58d655c41f9f /fs/jbd/commit.c | |
| parent | CRED: Fix get_task_cred() and task_state() to not resurrect dead credentials (diff) | |
| download | kernel-8f92054e7ca1d3a3ae50fb42d2253ac8730d9b2a.tar.gz kernel-8f92054e7ca1d3a3ae50fb42d2253ac8730d9b2a.zip | |
CRED: Fix __task_cred()'s lockdep check and banner comment
Fix __task_cred()'s lockdep check by removing the following validation
condition:
lockdep_tasklist_lock_is_held()
as commit_creds() does not take the tasklist_lock, and nor do most of the
functions that call it, so this check is pointless and it can prevent
detection of the RCU lock not being held if the tasklist_lock is held.
Instead, add the following validation condition:
task->exit_state >= 0
to permit the access if the target task is dead and therefore unable to change
its own credentials.
Fix __task_cred()'s comment to:
(1) discard the bit that says that the caller must prevent the target task
from being deleted. That shouldn't need saying.
(2) Add a comment indicating the result of __task_cred() should not be passed
directly to get_cred(), but rather than get_task_cred() should be used
instead.
Also put a note into the documentation to enforce this point there too.
Signed-off-by: David Howells <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Paul E. McKenney <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/jbd/commit.c')
0 files changed, 0 insertions, 0 deletions
