summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/stacktrace.h
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2021-07-05 17:53:42 +0200
committerVasily Gorbik <gor@linux.ibm.com>2021-07-08 22:12:18 +0200
commita9b660849ffa70aaef868d0bc54e325919fe1281 (patch)
tree435c1bf417e2ee589c4e05cdf19ea3709d17cd58 /arch/s390/include/asm/stacktrace.h
parents390: remove old CALL_ON_STACK() macro (diff)
downloadlinux-a9b660849ffa70aaef868d0bc54e325919fe1281.tar.xz
linux-a9b660849ffa70aaef868d0bc54e325919fe1281.zip
s390: add type checking to CALL_ON_STACK_NORETURN() macro
Make sure the to be called function takes no arguments (and returns void). Otherwise usage of CALL_ON_STACK_NORETURN() would generate broken code. Reviewed-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to '')
-rw-r--r--arch/s390/include/asm/stacktrace.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/s390/include/asm/stacktrace.h b/arch/s390/include/asm/stacktrace.h
index 1dc9e814b756..4d4d5dfac24b 100644
--- a/arch/s390/include/asm/stacktrace.h
+++ b/arch/s390/include/asm/stacktrace.h
@@ -191,12 +191,14 @@ struct stack_frame {
#define CALL_ON_STACK_NORETURN(fn, stack) \
({ \
+ void (*__fn)(void) = fn; \
+ \
asm volatile( \
" la 15,0(%[_stack])\n" \
" xc %[_bc](8,15),%[_bc](15)\n" \
" brasl 14,%[_fn]\n" \
::[_bc] "i" (offsetof(struct stack_frame, back_chain)), \
- [_stack] "a" (stack), [_fn] "X" (fn)); \
+ [_stack] "a" (stack), [_fn] "X" (__fn)); \
BUG(); \
})