Re: [PATCH] was: [RFC] removal of sync in panic

From: Andrew Morton
Date: Wed Jul 14 2004 - 17:47:38 EST


Christian Borntraeger <linux-kernel@xxxxxxxxxxxxxxx> wrote:
>
> 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

I agree with the patch in principle, but I'd be interested in what observed
problem motivated it?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/