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:31:40 +1100 |
commit | 9b35d974cc62df3796c80b9fff0c07fe18912e65 (patch) | |
tree | cfe0bef9ebdf8dfe9360646d7e38089b3006c2c8 | |
parent | 837035828978d1b1d7b504a18db7b6ee08aaefbe (diff) | |
download | skiboot-9b35d974cc62df3796c80b9fff0c07fe18912e65.zip skiboot-9b35d974cc62df3796c80b9fff0c07fe18912e65.tar.gz skiboot-9b35d974cc62df3796c80b9fff0c07fe18912e65.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 17f89d4..1dcc353 100644 --- a/core/stack.c +++ b/core/stack.c @@ -107,9 +107,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(); } |