]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
kprobes: Cleanup collect_one_slot() and __disable_kprobe()
authorJinjie Ruan <ruanjinjie@huawei.com>
Tue, 13 Aug 2024 11:53:34 +0000 (19:53 +0800)
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>
Thu, 31 Oct 2024 01:59:42 +0000 (10:59 +0900)
commitda93dd931baa921ee31796e0cd6402d995e1e4fc
tree534ea8bd7c33841eda46629f4254992f70e04dbd
parentce7f27dcd7e7721527648e27908e5200d1a3e3b0
kprobes: Cleanup collect_one_slot() and __disable_kprobe()

If kip->nused is not zero, collect_one_slot() return false, otherwise do
a lot of linked list operations, reverse the processing order to make the
code if nesting more concise. __disable_kprobe() is the same as well.

Link: https://lore.kernel.org/all/20240813115334.3922580-4-ruanjinjie@huawei.com/
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
kernel/kprobes.c