Skip to content

Commit

Permalink
[PATCH] exit: fix crash case
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alan-Cox authored and Linus Torvalds committed Sep 29, 2006
1 parent 3cfd088 commit 54306cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,8 @@ fastcall NORET_TYPE void do_exit(long code)
schedule();
BUG();
/* Avoid "noreturn function does return". */
for (;;) ;
for (;;)
cpu_relax(); /* For when BUG is null */
}

EXPORT_SYMBOL_GPL(do_exit);
Expand Down

0 comments on commit 54306cf

Please sign in to comment.