Files
kernel_arpi/include/linux
Oleg Nesterov 43e13cc107 cred: remove task_is_dead() from __task_cred() validation
Commit 8f92054e7c ("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 <oleg@redhat.com>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: David Howells <dhowells@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-31 17:49:28 -07:00
..
2012-05-15 17:30:30 -04:00
2012-05-08 14:13:25 -07:00
2012-05-02 14:15:27 -05:00
2012-05-25 12:46:23 +05:30
2012-05-17 15:36:35 -04:00
2012-05-29 16:22:23 -07:00
2012-05-22 11:32:31 +02:00
2012-05-12 14:28:14 +02:00
2012-05-12 14:28:16 +02:00
2012-05-07 10:58:57 -06:00
2012-05-21 21:09:38 +02:00
2012-05-29 16:22:21 -07:00
2012-05-31 17:49:26 -07:00
2012-05-11 10:56:56 +01:00
2012-05-09 13:58:06 -07:00
2012-05-22 15:20:28 -04:00
2012-05-29 16:22:19 -07:00
2012-05-29 16:22:24 -07:00
2012-05-19 02:51:00 -04:00
2012-05-08 20:25:42 +02:00
2012-05-26 14:17:30 -04:00
2012-05-16 15:17:08 -04:00
2012-05-14 14:15:32 -07:00
2012-05-12 15:53:42 -04:00
2012-05-17 08:51:59 -07:00
2012-05-21 23:52:30 -04:00
2012-05-19 18:34:57 -04:00
2012-05-31 17:49:26 -07:00
2012-05-08 12:35:06 +02:00
2012-05-14 18:53:19 -04:00
2012-05-29 16:22:28 -07:00
2012-05-21 16:16:58 -07:00
2012-05-04 16:58:47 -07:00
2012-05-22 12:16:16 +09:30