From: Andrew Morton <akpm@osdl.org>
To: Alexander Nyberg <alexn@dsv.su.se>
Cc: rostedt@goodmis.org, linux-kernel@vger.kernel.org, cw@f00f.org,
andre@cachola.com.br
Subject: Re: A patch for the file kernel/fork.c
Date: Fri, 6 May 2005 18:08:36 -0700 [thread overview]
Message-ID: <20050506180836.2d431ab2.akpm@osdl.org> (raw)
In-Reply-To: <1115307176.3993.9.camel@localhost.localdomain>
Alexander Nyberg <alexn@dsv.su.se> wrote:
>
> + /* We're taking recursive faults here in do_exit. Safest
> + * is to just leave this task alone and wait for reboot. */
I find this comment-block style a bit hard to maintain, and am anal about
consistency.
> + if (unlikely(tsk->flags & PF_EXITING)) {
> + printk(KERN_ALERT "\nFixing recursive fault but reboot is needed!\n");
> + set_current_state(TASK_UNINTERRUPTIBLE);
> + schedule();
> + }
> +
In the printk string, a \n will terminate the current facility level, so
your KERN_ALERT there is a no-op. I simply removed it, which might cause
messy output sometimes but that seems better than always adding a newline.
--- 25/kernel/exit.c~avoid-recursive-oopses 2005-05-06 18:03:45.000000000 -0700
+++ 25-akpm/kernel/exit.c 2005-05-06 18:06:01.000000000 -0700
@@ -795,6 +795,17 @@ fastcall NORET_TYPE void do_exit(long co
ptrace_notify((PTRACE_EVENT_EXIT << 8) | SIGTRAP);
}
+ /*
+ * We're taking recursive faults here in do_exit. Safest is to just
+ * leave this task alone and wait for reboot.
+ */
+ if (unlikely(tsk->flags & PF_EXITING)) {
+ printk(KERN_ALERT
+ "Fixing recursive fault but reboot is needed!\n");
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ schedule();
+ }
+
tsk->flags |= PF_EXITING;
/*
_
next prev parent reply other threads:[~2005-05-07 1:09 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
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 [this message]
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=20050506180836.2d431ab2.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=alexn@dsv.su.se \
--cc=andre@cachola.com.br \
--cc=cw@f00f.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.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