public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "André Pereira de Almeida" <andre@cachola.com.br>
To: Andrew Morton <akpm@osdl.org>
Cc: Alexander Nyberg <alexn@dsv.su.se>,
	cw@f00f.org, linux-kernel@vger.kernel.org
Subject: Re: A patch for the file kernel/fork.c
Date: Wed, 04 May 2005 17:54:32 -0300	[thread overview]
Message-ID: <42793688.2090700@cachola.com.br> (raw)
In-Reply-To: <20050504124104.3573e7f3.akpm@osdl.org>

Andrew Morton wrote:

>Alexander Nyberg <alexn@dsv.su.se> wrote:
>  
>
>>>[4300748.423000] Call Trace:
>>>[4300748.423000]  [<c0104bfa>] show_stack+0x7a/0x90
>>>[4300748.423000]  [<c0104d7d>] show_registers+0x14d/0x1b0
>>>[4300748.423000]  [<c0104fcc>] die+0x14c/0x2c0
>>>[4300748.423000]  [<c0118b6f>] do_page_fault+0x31f/0x638
>>>[4300748.423000]  [<c01046df>] error_code+0x4f/0x54
>>>[4300748.423000]  [<c02b88fd>] tty_wakeup+0x5d/0x60
>>>
>>>I think that maybe it's good to put a:
>>>       WARN_ON(!mm);
>>>but a BUG_ON or without this patch, the kernel will halt, even if the 
>>>problem is not so severe.
>>>      
>>>
>>Patching up the kernel hiding things that must not happen is not the way
>>to go. All kernel bugs are severe (as you just showed us!). Adding extra
>>checks like your original patch did may even cause much more harm
>>because it may hide other problems causing silent problems.
>>    
>>
>
>If I understand Andre correctly, his patch will prevent infinite recursion
>in the oops path - if some process oopses after having run exit_mm().
>
>If so then it's a reasonable debugging aid.  Although there might be better
>places to do it, such as
>
>	if (!current->i_tried_to_exit++)
>		return;
>
>in do_exit().   Dunno.
>
>  
>
I agree. If you need this patch, the you are in already in trouble, your 
kernel had already oopsed, your system is halted and you can't even send 
a bug report because you can't read read the call trace (it's an 
infinite recursion) and you can see only the end of it. It's not 
intended to hide the problem, the problem will be already in your screen.
André.

  reply	other threads:[~2005-05-04 21:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-04 14:46 A patch for the file kernel/fork.c André Pereira de Almeida
2005-05-04 17:54 ` Chris Wedgwood
2005-05-04 18:26   ` André Pereira de Almeida
2005-05-04 18:43     ` Chris Wedgwood
2005-05-04 19:04       ` André Pereira de Almeida
2005-05-04 19:16         ` Alexander Nyberg
2005-05-04 19:41           ` Andrew Morton
2005-05-04 20:54             ` André Pereira de Almeida [this message]
2005-05-04 21:21             ` Alexander Nyberg
2005-05-05 13:48               ` Steven Rostedt
2005-05-05 15:32                 ` Alexander Nyberg
2005-05-07  1:08                   ` Andrew Morton
2005-05-04 19:11     ` Valdis.Kletnieks
2005-05-04 19:34       ` Dmitry Torokhov
2005-05-04 19:35       ` André Pereira de Almeida

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=42793688.2090700@cachola.com.br \
    --to=andre@cachola.com.br \
    --cc=akpm@osdl.org \
    --cc=alexn@dsv.su.se \
    --cc=cw@f00f.org \
    --cc=linux-kernel@vger.kernel.org \
    /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