From: Oleg Nesterov <oleg@redhat.com>
To: David Howells <dhowells@redhat.com>
Cc: Sasha Levin <sasha.levin@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
richard@nod.at, Dave Jones <davej@redhat.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: kernel: signal: NULL ptr deref when killing process
Date: Thu, 21 Aug 2014 19:17:26 +0200 [thread overview]
Message-ID: <20140821171726.GB27140@redhat.com> (raw)
In-Reply-To: <3200.1408638173@warthog.procyon.org.uk>
On 08/21, David Howells wrote:
>
> Oleg Nesterov <oleg@redhat.com> wrote:
>
> > David, any other reason why ->real_cred can be NULL ? (assuming that I
> > interpret this asm correctly).
>
> It should only be possible to see ->real_cred as being NULL after exit_creds()
> has been called from __put_task_struct() for a task that has finished
> construction.
Yes, thanks, this was my understanding...
> Is there a race between kill() and exit() brought on by the kill path only
> using the RCU read lock? This doesn't prevent ->real_cred from being
> modified, but it looks like this should, in combination with
> delayed_put_task_struct(), prevent it from being cleared.
Yes, rcu should protect us from both delayed_put_pid() and delayed_put_task().
Everything looks correct... And there are a lot of other similar users of
find_vpid/find_task_by_vpid/pid_task/etc under rcu, I can't recall any bug
in this area.
I am puzzled. Note also that ->signal == NULL. Will try to think more,
but so far I have no any idea.
Oleg.
next prev parent reply other threads:[~2014-08-21 17:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 11:18 Sasha Levin
2014-08-20 14:12 ` Oleg Nesterov
2014-08-20 15:06 ` Oleg Nesterov
2014-08-20 15:30 ` Oleg Nesterov
2014-08-21 15:20 ` Sasha Levin
2014-08-21 17:11 ` Oleg Nesterov
2014-08-21 16:22 ` David Howells
2014-08-21 17:17 ` Oleg Nesterov [this message]
2014-08-27 3:38 ` Sasha Levin
2014-08-27 14:16 ` Oleg Nesterov
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=20140821171726.GB27140@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=davej@redhat.com \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=richard@nod.at \
--cc=sasha.levin@oracle.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