lkml.org 
[lkml]   [2011]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/2] creds: kill __task_cred()->task_is_dead() check
Date
Oleg Nesterov <oleg@redhat.com> wrote:

> From 8f92054e commit:
>
> 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.
>
> 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().
>
> Unfortunately, we can't kill task_is_dead() right now, it has already
> found the users in drivers/staging/, and I bet the usage is wrong.
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>

Acked-by: David Howells <dhowells@redhat.com>

It simplifies stuff in exchange for the most minor of slowdowns, so fair
enough.


\
 
 \ /
  Last update: 2011-09-20 18:31    [W:0.112 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site