MIPS: kprobes: flush_insn_slot should flush only if probe initialised
| Newsgroups | gmane.linux.ports.mips.cvs |
|---|---|
| Message-ID | <S23993853AbdGCBGx2ys30/[email protected]> |
Author: Marcin Nowakowski <[email protected]> Thu Jun 8 15:20:32 2017 +0200 Comitter: Ralf Baechle <[email protected]> Thu Jun 8 15:37:33 2017 +0200 Commit: 519d3b7887a73dc2b1151bbc21ddc3bd2e655a0e Gitweb: https://git.linux-mips.org/g/ralf/linux/519d3b7887a7 Branch: linux-3.9-stable 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: c1bf207d6ee1 ("MIPS: kprobe: Add support.") Signed-off-by: Marcin Nowakowski <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/16296/ Signed-off-by: Ralf Baechle <[email protected]> (cherry picked from commit a1497c7641ff53ca3632e87030fc905f73f2e7a5) --- arch/mips/include/asm/kprobes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)