From: Roland McGrath <roland@redhat.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Andi Kleen <andi@firstfloor.org>,
David Howells <dhowells@redhat.com>,
Neil Horman <nhorman@tuxdriver.com>,
Rusty Russell <rusty@rustcorp.com.au>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wait_for_helper: SIGCHLD from user-space can lead to use-after-free
Date: Wed, 10 Mar 2010 12:32:09 -0800 (PST) [thread overview]
Message-ID: <20100310203209.54168BCCD@magilla.sf.frob.com> (raw)
In-Reply-To: Oleg Nesterov's message of Wednesday, 10 March 2010 18:16:34 +0100 <20100310171634.GA1039@redhat.com>
SIGCHLD being blocked doesn't affect reaping, so SIG_IGN or sa_flags &
SA_NOCLDWAIT is the only thing that would do this. How does that come
about here in this kthread? Is it inherited from the instigating user
process? If so, then SA_NOCLDWAIT is as much a problem as SIG_IGN.
Or I guess maybe it's from ignore_signals() in kthreadd()?
In that case SIG_IGN is indeed all that matters. (I don't really
know all the kthread/kmod/userhelper code organization.)
Perhaps it would be cleaner to do:
flush_signal_handlers(current, 1);
in wait_for_helper. That should make it redundant in ____call_usermodehelper,
so it could be removed from there.
Thanks,
Roland
next prev parent reply other threads:[~2010-03-10 20:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-10 17:16 [PATCH] wait_for_helper: SIGCHLD from user-space can lead to use-after-free Oleg Nesterov
2010-03-10 18:07 ` Neil Horman
2010-03-10 20:32 ` Roland McGrath [this message]
2010-03-10 21:19 ` Oleg Nesterov
2010-03-10 21:27 ` Roland McGrath
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=20100310203209.54168BCCD@magilla.sf.frob.com \
--to=roland@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=dhowells@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=oleg@redhat.com \
--cc=rusty@rustcorp.com.au \
/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