diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2014-10-27 15:49:06 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-10-28 09:24:12 +0100 |
commit | 6ed15ea67b5ebb13ececcfc6056d90a70ed96f7b (patch) | |
tree | 01aaf0d3563be76c5cb667e84523bcd70d3331b0 /arch/s390 | |
parent | e43b49a0cb9c9ea958edcf7520aae2490549c68b (diff) | |
download | op-kernel-dev-6ed15ea67b5ebb13ececcfc6056d90a70ed96f7b.zip op-kernel-dev-6ed15ea67b5ebb13ececcfc6056d90a70ed96f7b.tar.gz |
s390/ftrace: add ftrace_graph_is_dead() check
Add an ftrace_graph_is_dead() check to prepare_ftrace_return() in order to
detect an internal ftrace graph error. This allows to prevent further ftrace
graph handling and hopefully keeps the kernel alive.
This patch is the same like for all other architectures.
For unkown reasons s390 was left out.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/ftrace.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/kernel/ftrace.c b/arch/s390/kernel/ftrace.c index 51d14fe5..ca1cabb 100644 --- a/arch/s390/kernel/ftrace.c +++ b/arch/s390/kernel/ftrace.c @@ -121,6 +121,8 @@ unsigned long __kprobes prepare_ftrace_return(unsigned long parent, { struct ftrace_graph_ent trace; + if (unlikely(ftrace_graph_is_dead())) + goto out; if (unlikely(atomic_read(¤t->tracing_graph_pause))) goto out; ip = (ip & PSW_ADDR_INSN) - MCOUNT_INSN_SIZE; |