diff --git a/include/linux/bpf.h b/include/linux/bpf.h index cd9b96434904..673d19b360a7 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -1893,6 +1893,7 @@ struct bpf_raw_tp_link { struct bpf_link link; struct bpf_raw_event_map *btp; u64 cookie; + struct rcu_head rcu; }; struct bpf_link_primer { diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index dd89bf809772..b9dfc36d8a77 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -3790,7 +3790,7 @@ static void bpf_raw_tp_link_dealloc(struct bpf_link *link) struct bpf_raw_tp_link *raw_tp = container_of(link, struct bpf_raw_tp_link, link); - kfree(raw_tp); + kfree_rcu(raw_tp, rcu); } static void bpf_raw_tp_link_show_fdinfo(const struct bpf_link *link,