* [PATCH] Fix sysrq/panic for gcc 3.1
@ 2002-04-20 16:33 Andi Kleen
0 siblings, 0 replies; only message in thread
From: Andi Kleen @ 2002-04-20 16:33 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
Without this patch a loop checking for emergency_sync_scheduled in panic() is optimized
away by gcc 3.1, which causes hangs in panic.
-Andi
diff -X ../../KDIFX -x *-o -x *-RESERVE -burpN ../../v2.5/linux/drivers/char/sysrq.c linux/drivers/char/sysrq.c
--- ../../v2.5/linux/drivers/char/sysrq.c Thu Mar 28 10:06:16 2002
+++ linux/drivers/char/sysrq.c Fri Apr 12 18:32:46 2002
@@ -186,7 +186,7 @@ static void go_sync(struct super_block *
* block devices and malfunctional network filesystems.
*/
-int emergency_sync_scheduled;
+volatile int emergency_sync_scheduled;
void do_emergency_sync(void) {
struct super_block *sb;
diff -X ../../KDIFX -x *-o -x *-RESERVE -burpN ../../v2.5/linux/include/linux/sysrq.h linux/include/linux/sysrq.h
--- ../../v2.5/linux/include/linux/sysrq.h Wed Apr 17 13:33:34 2002
+++ linux/include/linux/sysrq.h Sat Apr 20 16:12:00 2002
@@ -103,7 +103,7 @@ static inline int __reterr(void)
/* Deferred actions */
-extern int emergency_sync_scheduled;
+extern volatile int emergency_sync_scheduled;
#define EMERG_SYNC 1
#define EMERG_REMOUNT 2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-04-20 17:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-20 16:33 [PATCH] Fix sysrq/panic for gcc 3.1 Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox