From: David Howells <dhowells@redhat.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: dhowells@redhat.com, Andrew Morton <akpm@linux-foundation.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] creds: kill __task_cred()->task_is_dead() validation
Date: Wed, 11 Apr 2012 11:41:34 +0100 [thread overview]
Message-ID: <13911.1334140894@redhat.com> (raw)
In-Reply-To: <20120410194625.GB7196@redhat.com>
Oleg Nesterov <oleg@redhat.com> wrote:
> commit 8f92054e:
>
> 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
> found the bugy users in drivers/staging/, the fix already exists.
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
prev parent reply other threads:[~2012-04-11 11:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 19:45 [PATCH 0/1] 3rd resend: kill __task_cred()->task_is_dead() Oleg Nesterov
2012-04-10 19:46 ` [PATCH 1/1] creds: kill __task_cred()->task_is_dead() validation Oleg Nesterov
2012-04-11 10:09 ` Eric W. Biederman
2012-04-11 18:52 ` Oleg Nesterov
2012-04-11 10:41 ` David Howells [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=13911.1334140894@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome