Skip to content

Commit

Permalink
exit fix
Browse files Browse the repository at this point in the history
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
  • Loading branch information
olsajiri committed Sep 26, 2023
1 parent 2a6972b commit bcb643a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bpf/process/bpf_exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ char _license[] __attribute__((section("license"), used)) = "GPL";
* won't race with another clone, because there's no other thread to call
* it (current thread is in do_exit).
*/
__attribute__((section("kprobe/do_task_dead"), used)) int
__attribute__((section("kprobe/acct_process"), used)) int
event_exit(struct pt_regs *ctx)
{
struct task_struct *task = (struct task_struct *)get_current_task();
Expand All @@ -59,5 +59,6 @@ event_exit(struct pt_regs *ctx)

if (live.counter == 0)
event_exit_send(ctx, pid_tgid >> 32);

return 0;
}
4 changes: 2 additions & 2 deletions pkg/sensors/base/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ var (

Exit = program.Builder(
"bpf_exit.o",
"do_task_dead",
"kprobe/do_task_dead",
"acct_process",
"kprobe/acct_process",
"event_exit",
"kprobe",
)
Expand Down

0 comments on commit bcb643a

Please sign in to comment.