diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-12-21 18:25:53 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-12-22 13:52:36 +1100 |
commit | 635cb0ec9d6907803b9fbfc29872c38a44afe906 (patch) | |
tree | 392ddced978b2d8f1307ec3e4b1e4e493f39057e | |
parent | 61a59d267b9bf86acfeea22c48c5d4a5f37a4eff (diff) | |
download | skiboot-635cb0ec9d6907803b9fbfc29872c38a44afe906.zip skiboot-635cb0ec9d6907803b9fbfc29872c38a44afe906.tar.gz skiboot-635cb0ec9d6907803b9fbfc29872c38a44afe906.tar.bz2 |
stack: Don't recurse into __stack_chk_fail
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
(cherry picked from commit d7ffce9096d5a23ee4ff309910983d823e953bd2)
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | core/stack.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/stack.c b/core/stack.c index 3b92a14..17a4ca4 100644 --- a/core/stack.c +++ b/core/stack.c @@ -112,9 +112,14 @@ void backtrace(void) __print_backtrace(mfspr(SPR_PIR), bt_buf, ents, NULL, NULL, true); } -void __noreturn __nomcount __stack_chk_fail(void); -void __noreturn __nomcount __stack_chk_fail(void) +void __nomcount __stack_chk_fail(void); +void __nomcount __stack_chk_fail(void) { + static bool failed_once; + + if (failed_once) + return; + failed_once = true; prlog(PR_EMERG, "Stack corruption detected !\n"); abort(); } |