diff options
| author | Oleg Nesterov <[email protected]> | 2012-05-31 16:26:16 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2012-05-31 17:49:28 -0700 |
| commit | 43e13cc107cf6cd3c15fbe1cef849435c2223d50 (patch) | |
| tree | 9a1b3aa79ec2e8374944c23cf57a73790a3fc6ce /tools/perf/scripts/python | |
| parent | 9b3c98cd663750c33434572ff76ba306505eba5a (diff) | |
cred: remove task_is_dead() from __task_cred() validation
Commit 8f92054e7ca1 ("CRED: Fix __task_cred()'s lockdep check and banner
comment"):
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.
OK, but afaics currently this can only help wait_task_zombie() which calls
__task_cred() without rcu lock.
Remove this validation and change wait_task_zombie() to use task_uid()
instead. This means we do rcu_read_lock() only to shut up the lockdep,
but we already do the same in, say, wait_task_stopped().
task_is_dead() should die, task->exit_state != 0 means that this task has
passed exit_notify(), only do_wait-like code paths should use this.
Unfortunately, we can't kill task_is_dead() right now, it has already
acquired buggy users in drivers/staging. The fix already exists.
Signed-off-by: Oleg Nesterov <[email protected]>
Reviewed-by: "Eric W. Biederman" <[email protected]>
Acked-by: David Howells <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Paul E. McKenney <[email protected]>
Cc: James Morris <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions