From: Chuck Ebbert <76306.1226@compuserve.com> Date: Sun, 25 Jun 2006 12:46:53 +0000 (-0700) Subject: [PATCH] i386: cpu_relax() in crash.c and doublefault.c X-Git-Tag: v2.6.18-rc1~1061 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=caad3c2a15dfa2e0da8cf51a57c052372123483c;p=linux-2.6 [PATCH] i386: cpu_relax() in crash.c and doublefault.c Add cpu_relax() to infinite loops in crash.c and doublefault.c. This is the safest change. Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com> Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c index 2b0cfce24a..21dc1bbb80 100644 --- a/arch/i386/kernel/crash.c +++ b/arch/i386/kernel/crash.c @@ -114,7 +114,8 @@ static int crash_nmi_callback(struct pt_regs *regs, int cpu) atomic_dec(&waiting_for_crash_ipi); /* Assume hlt works */ halt(); - for(;;); + for (;;) + cpu_relax(); return 1; } diff --git a/arch/i386/kernel/doublefault.c b/arch/i386/kernel/doublefault.c index 5edb1d379a..b4d14c2eb3 100644 --- a/arch/i386/kernel/doublefault.c +++ b/arch/i386/kernel/doublefault.c @@ -44,7 +44,8 @@ static void doublefault_fn(void) } } - for (;;) /* nothing */; + for (;;) + cpu_relax(); } struct tss_struct doublefault_tss __cacheline_aligned = {