]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: kprobes: flush_insn_slot should flush only if probe initialised
authorMarcin Nowakowski <marcin.nowakowski@imgtec.com>
Thu, 8 Jun 2017 13:20:32 +0000 (15:20 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 8 Jun 2017 13:42:05 +0000 (15:42 +0200)
commitcb4e02e976aa2c030b6c7aa57b1a2ea619be0df8
tree5596fd6ed960744d301f1af6329942e6684711ee
parent25f4e42b3f7ffbb2fe5b5533b3b031e8af7dc367
MIPS: kprobes: flush_insn_slot should flush only if probe initialised

When ftrace is used with kprobes, it is possible for a kprobe to contain
an invalid location (ie. only initialised to 0 and not to a specific
location in the code). Trying to perform a cache flush on such location
leads to a crash r4k_flush_icache_range().

Fixes: e2959fbe2e8e ("MIPS: kprobe: Add support.")
Signed-off-by: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16296/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/kprobes.h