PATCH: Fix crash case

From: Alan Cox
Date: Wed Aug 16 2006 - 12:12:16 EST


If we are going to BUG() not panic() here then we should cover the case
of the BUG being compiled out

Signed-off-by: Alan Cox <alan@xxxxxxxxxx>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.18-rc4-mm1/kernel/exit.c linux-2.6.18-rc4-mm1/kernel/exit.c
--- linux.vanilla-2.6.18-rc4-mm1/kernel/exit.c 2006-08-15 15:40:19.000000000 +0100
+++ linux-2.6.18-rc4-mm1/kernel/exit.c 2006-08-15 16:03:23.000000000 +0100
@@ -979,7 +979,8 @@
schedule();
BUG();
/* Avoid "noreturn function does return". */
- for (;;) ;
+ for (;;)
+ cpu_relax(); /* For when BUG is null */
}

EXPORT_SYMBOL_GPL(do_exit);

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