]> git.itanic.dy.fi Git - linux-stable/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2018 17:50:19 +0000 (19:50 +0200)
commit781af39aaa9e27a841fb1bc8868fda771b56337a
treec4b0f704da3b61e9aee8e96688de823f53cd02c3
parent16119beefc4ad69709d28a14ecf73920d0dcd443
MIPS: kprobes: flush_insn_slot should flush only if probe initialised

[ Upstream commit 698b851073ddf5a894910d63ca04605e0473414e ]

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 <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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/include/asm/kprobes.h