Skip to content

Commit

Permalink
[PATCH] i386: cpu_relax() in crash.c and doublefault.c
Browse files Browse the repository at this point in the history
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 <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Chuck Ebbert authored and Linus Torvalds committed Jun 25, 2006
1 parent 1869891 commit caad3c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion arch/i386/kernel/crash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion arch/i386/kernel/doublefault.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ static void doublefault_fn(void)
}
}

for (;;) /* nothing */;
for (;;)
cpu_relax();
}

struct tss_struct doublefault_tss __cacheline_aligned = {
Expand Down

0 comments on commit caad3c2

Please sign in to comment.