lkml.org 
[lkml]   [2004]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH] was: [RFC] removal of sync in panic
    Date
    Lars Marowsky-Bree wrote:
    > > 1. remove sys_sync completely: syslogd and klogd use fsync. No need to
    > > help them. Furthermore we have a severe problem which is worth a panic,
    > > so we better dont do any I/O.

    > I've seen exactly the behaviour you describe and would be inclined to go
    > for this option too.

    As this problem definitely exists, here is a patch.

    --- linux-2.6.8-rc1/kernel/panic.c 2004-06-16 07:20:04.000000000 +0200
    +++ linux-patch/kernel/panic.c 2004-07-14 19:37:02.000000000 +0200
    @@ -59,13 +59,7 @@ NORET_TYPE void panic(const char * fmt,
    va_start(args, fmt);
    vsnprintf(buf, sizeof(buf), fmt, args);
    va_end(args);
    - printk(KERN_EMERG "Kernel panic: %s\n",buf);
    - if (in_interrupt())
    - printk(KERN_EMERG "In interrupt handler - not syncing\n");
    - else if (!current->pid)
    - printk(KERN_EMERG "In idle task - not syncing\n");
    - else
    - sys_sync();
    + printk(KERN_EMERG "Kernel panic - not syncing: %s\n",buf);
    bust_spinlocks(0);

    #ifdef CONFIG_SMP

    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 14:04    [W:0.022 / U:0.356 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site