MIPS: kprobes: flush_insn_slot should flush only if probe initialised
| Newsgroups | gmane.linux.ports.mips.cvs |
|---|---|
| Message-ID | <S23994626AbdGCBIAVWGr0/[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:28 2017 +0200 Commit: 876b0856a09c311034954cf2df9cf039399134aa Gitweb: https://git.linux-mips.org/g/ralf/linux/876b0856a09c Branch: linux-4.6-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(-)