From: Alan Cox Date: Fri, 29 Sep 2006 09:00:42 +0000 (-0700) Subject: [PATCH] exit: fix crash case X-Git-Tag: accepted/tizen/common/20141203.182822~34942 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=54306cf04c0ea0a8c432603dbc657ab62a438668;p=platform%2Fkernel%2Flinux-arm64.git [PATCH] exit: fix crash case 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/exit.c b/kernel/exit.c index 3ec7b10..a51b347 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -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);