]> git.baikalelectronics.ru Git - kernel.git/commit
kprobe: reverse kp->flags when arm_kprobe failed
authorLi Qiang <liq3ea@163.com>
Thu, 3 Nov 2022 23:49:31 +0000 (08:49 +0900)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Thu, 3 Nov 2022 23:49:31 +0000 (08:49 +0900)
commit63799733423da00d8633b56d0e494ccec651c3b9
tree3b8675c2f6394755118a8858aecbb24802d873ea
parentae696798e39b0da094b8950fa753a064aa136151
kprobe: reverse kp->flags when arm_kprobe failed

In aggregate kprobe case, when arm_kprobe failed,
we need set the kp->flags with KPROBE_FLAG_DISABLED again.
If not, the 'kp' kprobe will been considered as enabled
but it actually not enabled.

Link: https://lore.kernel.org/all/20220902155820.34755-1-liq3ea@163.com/
Fixes: 0ec4f17eb87f ("kprobes: Propagate error from arm_kprobe_ftrace()")
Cc: stable@vger.kernel.org
Signed-off-by: Li Qiang <liq3ea@163.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
kernel/kprobes.c