MIPS: kprobes: flush_insn_slot should flush only if probe initialised
| Newsgroups | gmane.linux.ports.mips.cvs |
|---|---|
| Message-ID | <S23994792AbdGCBHyoO8r0/[email protected]> |
Author: Marcin Nowakowski <[email protected]> Thu Jun 8 15:20:32 2017 +0200 Comitter: Ralf Baechle <[email protected]> Thu Jun 8 15:35:37 2017 +0200 Commit: 6329145d31b1cf67eb77dbccca15eac0887d7f67 Gitweb: https://git.linux-mips.org/g/ralf/linux/6329145d31b1 Branch: linux-4.5-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(-)