public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Andrea Arcangeli <andrea@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, jack@suse.cz,
	Ingo Molnar <mingo@elte.hu>,
	Alexey Dobriyan <adobriyan@gmail.com>
Subject: Re: /proc dcache deadlock in do_exit
Date: Tue, 27 Nov 2007 19:07:04 -0700	[thread overview]
Message-ID: <m1ir3ngm2f.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20071128014509.GE6840@v2.random> (Andrea Arcangeli's message of "Wed, 28 Nov 2007 02:45:09 +0100")

Andrea Arcangeli <andrea@suse.de> writes:

>> 
>> So you may need to apply this one too (this one is needed to fix the
>> second bug, my previous patch is needed after applying this one):
>
> thinking what happened once already, I think this would be more
> debuggable but maybe not... dunno.

Please god no.   The inability to schedule is a bug that apparently
was fixed after sles9 forked off.

In mainline it is safe to sleep until the very end of do_exit and
your suggest patch breaks that.

None of your patches are necessary for mainline.



I believe the commit below is the one that really fixed this issue,
although it may have been something earlier.  But it may have been
earlier, and there have been some significant clean ups since then.

> commit 00732b345b940de766fefaf1297ce26a67bdcea9
> Author: mingo <mingo>
> Date:   Tue Oct 19 06:12:06 2004 +0000
> 
>     [PATCH] fix & clean up zombie/dead task handling & preemption
>     
>     This patch fixes all the preempt-after-task->state-is-TASK_DEAD problems we
>     had.  Right now, the moment procfs does a down() that sleeps in
>     proc_pid_flush() [it could] our TASK_DEAD state is zapped and we might be
>     back to TASK_RUNNING to and we trigger this assert:
>     
>             schedule();
>             BUG();
>             /* Avoid "noreturn function does return".  */
>             for (;;) ;
>     
>     I have split out TASK_ZOMBIE and TASK_DEAD into a separate p->exit_state
>     field, to allow the detaching of exit-signal/parent/wait-handling from
>     descheduling a dead task.  Dead-task freeing is done via PF_DEAD.
>     
>     Tested the patch on x86 SMP and UP, but all architectures should work
>     fine.
>     
>     Signed-off-by: Ingo Molnar <mingo@elte.hu>
>     Signed-off-by: Andrew Morton <akpm@osdl.org>
>     Signed-off-by: Linus Torvalds <torvalds@osdl.org>
>     
>     BKrev: 4174b036IkpU2-XeLFkjqH681u4Pyg
> 

Eric

  reply	other threads:[~2007-11-28  2:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-27 13:20 /proc dcache deadlock in do_exit Andrea Arcangeli
2007-11-27 22:38 ` Andrew Morton
2007-11-28  1:21   ` Andrea Arcangeli
2007-11-28  1:45     ` Andrea Arcangeli
2007-11-28  2:07       ` Eric W. Biederman [this message]
2007-11-28  1:53     ` Eric W. Biederman
2007-11-28  1:43   ` Eric W. Biederman
2007-11-28 16:30     ` Oleg Nesterov
2007-11-28  2:09   ` Eric W. Biederman

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=m1ir3ngm2f.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrea@suse.de \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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