public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: will_schmidt@vnet.ibm.com
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linuxppc-dev@ozlabs.org, Oleg Nesterov <oleg@tv-sign.ru>,
	Anton Blanchard <anton@samba.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] [PATCH i386] during VM oom condition, kill all threads in process group
Date: Fri, 08 Jun 2007 16:48:41 -0600	[thread overview]
Message-ID: <m1abvarrjq.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <1181337147.21409.42.camel@farscape.rchland.ibm.com> (Will Schmidt's message of "Fri, 08 Jun 2007 16:12:26 -0500")

Will Schmidt <will_schmidt@vnet.ibm.com> writes:

> On Fri, 2007-06-08 at 12:32 -0700, Andrew Morton wrote:
>> On Fri, 08 Jun 2007 14:19:18 -0500
>> Will Schmidt <will_schmidt@vnet.ibm.com> wrote:
>> 
>> > > > > zap_other_threads() requires tasklist_lock.
>> > 
>
>> In fact, it's probably the case that rcu_read_lock() is now sufficient
>> locking coverage for zap_other_threads() (cc's people).
>> 
>> It had better be, because do_group_exit() forgot to take tasklist_lock.  It
>> is perhaps relying upon spin_lock()'s hidden rcu_read_lock() properties
>> without so much as a code comment, which would be somewhat nasty of it.
>
>> You could perhaps just call do_group_exit() from within the fault
>> handler,
>> btw.
>
> Yup, so looks like I can actually replace the existing do_exit() call
> with do_group_exit().   I'll sit on this for a bit to give other folks a
> chance to comment on which lock call is sufficient, read_lock() or
> rcu_read_lock(), etc;  and do_group_exit()'s issue with taking
> tasklist_lock. 

No.  The rcu_read_lock is not sufficient.
Yes.  sighand->siglock is enough, and we explicitly take it in
do_group_exit before calling zap_other_threads.

Unless I have completely miss-understood this thread.

Eric

  reply	other threads:[~2007-06-08 22:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-05 17:48 [PATCH 1/3] [PATCH i386] during VM oom condition, kill all threads in process group Will Schmidt
2007-06-05 17:48 ` [PATCH 2/3] [PATCH powerpc] " Will Schmidt
2007-06-05 18:17   ` Will Schmidt
2007-06-05 17:48 ` [PATCH 3/3] [PATCH x86_64] " Will Schmidt
2007-06-07 22:34 ` [PATCH 1/3] [PATCH i386] " Andrew Morton
2007-06-07 23:16   ` Anton Blanchard
2007-06-08  0:10     ` Andrew Morton
2007-06-08 19:19       ` Will Schmidt
2007-06-08 19:32         ` Andrew Morton
2007-06-08 21:12           ` Will Schmidt
2007-06-08 22:48             ` Eric W. Biederman [this message]
2007-06-13 15:51               ` 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=m1abvarrjq.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=akpm@linux-foundation.org \
    --cc=anton@samba.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=oleg@tv-sign.ru \
    --cc=will_schmidt@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