Messages in this thread Patch in this message | | | Date | Fri, 6 May 2005 18:08:36 -0700 | From | Andrew Morton <> | Subject | Re: A patch for the file kernel/fork.c |
| |
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; /* _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |