Commit 74bc3a5
bpf: Add missing btf_put to register_btf_id_dtor_kfuncs
We take the BTF reference before we register dtors and we need
to put it back when it's done.
We probably won't se a problem with kernel BTF, but module BTF
would stay loaded (because of the extra ref) even when its module
is removed.
Cc: Kumar Kartikeya Dwivedi <[email protected]>
Fixes: 5ce937d ("bpf: Populate pairs of btf_id and destructor kfunc in btf")
Acked-by: Kumar Kartikeya Dwivedi <[email protected]>
Signed-off-by: Jiri Olsa <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>1 parent 2eecf81 commit 74bc3a5
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7782 | 7782 | | |
7783 | 7783 | | |
7784 | 7784 | | |
7785 | | - | |
7786 | 7785 | | |
7787 | | - | |
| 7786 | + | |
| 7787 | + | |
7788 | 7788 | | |
7789 | 7789 | | |
7790 | 7790 | | |
| |||
0 commit comments