Files
kernel_xiaomi_sm8250/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-25 12:46:23 +05:30
2012-05-29 16:22:23 -07:00
2012-05-22 11:32:31 +02: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-22 15:20:28 -04:00
2012-05-29 16:22:19 -07:00
2012-05-29 16:22:24 -07:00
2012-05-26 14:17:30 -04: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-29 16:22:28 -07:00
2012-05-21 16:16:58 -07:00
2012-05-22 12:16:16 +09:30