summaryrefslogtreecommitdiff
path: root/arch/s390/kernel/unwind_bc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/unwind_bc.c')
-rw-r--r--arch/s390/kernel/unwind_bc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/s390/kernel/unwind_bc.c b/arch/s390/kernel/unwind_bc.c
index ef42d5f77ce7..da2d4d4c5b0e 100644
--- a/arch/s390/kernel/unwind_bc.c
+++ b/arch/s390/kernel/unwind_bc.c
@@ -92,6 +92,10 @@ bool unwind_next_frame(struct unwind_state *state)
}
}
+ /* Sanity check: ABI requires SP to be aligned 8 bytes. */
+ if (sp & 0x7)
+ goto out_err;
+
ip = ftrace_graph_ret_addr(state->task, &state->graph_idx, ip, (void *) sp);
/* Update unwind state */