aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorChristian Bornträger <linux-kernel@borntraeger.net>2004-08-22 22:46:53 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-22 22:46:53 -0700
commit6cfa4c9fd86139036d1b03578235c607a1b94d0a (patch)
tree42b9e3bde34a990432bea1715f12f4073e2d52f8 /kernel
parent42e3ec013d49c6a896dd0ba803f7b32c77a734be (diff)
downloadhistory-6cfa4c9fd86139036d1b03578235c607a1b94d0a.tar.gz
[PATCH] remove sync() from panic
Various people have reported deadlocks and it has aways seemed a bit risky to try to sync the filesystems at this stage anyway. "I have seen panic failing two times lately on an SMP system. The box panic'ed but was running happily on the other cpus. The culprit of this failure is the fact, that these panics have been caused by a block device or a filesystem (e.g. using errors=panic). In these cases the likelihood of a failure/hang of sys_sync() is high. This is exactly what happened in both cases I have seen. Meanwhile the other cpus are happily continuing destroying data as the kernel has a severe problem but its not aware of that as smp_send_stop happens after sys_sync." Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/panic.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index 3c1581eb65bd24..b3abe97f88a695 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -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