OSDN Git Service

csky/kprobe: reclaim insn_slot on kprobe unregistration
authorLiao Chang <liaochang1@huawei.com>
Wed, 25 May 2022 08:02:41 +0000 (16:02 +0800)
committerGuo Ren <guoren@linux.alibaba.com>
Sat, 23 Jul 2022 01:36:14 +0000 (21:36 -0400)
commita2310c74d418deca0f1d749c45f1f43162510f51
tree69a0d22e32cfbcd7bcdde2917901f3fe526da8dd
parentff6992735ade75aae3e35d16b17da1008d753d28
csky/kprobe: reclaim insn_slot on kprobe unregistration

On kprobe registration kernel allocate one insn_slot for new kprobe,
but it forget to reclaim the insn_slot on unregistration, leading to a
potential leakage.

Reported-by: Chen Guokai <chenguokai17@mails.ucas.ac.cn>
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Liao Chang <liaochang1@huawei.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
arch/csky/kernel/probes/kprobes.c