]> www.infradead.org Git - users/jedix/linux-maple.git/commit
uprobes: kill the unnecessary put_uprobe/xol_free_insn_slot in uprobe_free_utask()
authorOleg Nesterov <oleg@redhat.com>
Sun, 29 Sep 2024 14:42:39 +0000 (16:42 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 7 Oct 2024 07:28:44 +0000 (09:28 +0200)
commit430af825ba991730f8acc3c804a4aef82e9f7ff6
treebf3560527a8f0bb5937c3bae5274df3328ba1655
parentc7b4133c48445dde789ed30b19ccb0448c7593f7
uprobes: kill the unnecessary put_uprobe/xol_free_insn_slot in uprobe_free_utask()

If pre_ssout() succeeds and sets utask->active_uprobe and utask->xol_vaddr
the task must not exit until it calls handle_singlestep() which does the
necessary put_uprobe() and xol_free_insn_slot().

Remove put_uprobe() and xol_free_insn_slot() from uprobe_free_utask(). With
this change xol_free_insn_slot() can't hit xol_area/utask/xol_vaddr == NULL,
we can kill the unnecessary checks checks and simplify this function more.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240929144239.GA9475@redhat.com
kernel/events/uprobes.c