Commit e9c856c
bpf: put uprobe link's path and task in release callback
There is no need to delay putting either path or task to deallocation
step. It can be done right after bpf_uprobe_unregister. Between release
and dealloc, there could be still some running BPF programs, but they
don't access either task or path, only data in link->uprobes, so it is
safe to do.
On the other hand, doing path_put() in dealloc callback makes this
dealloc sleepable because path_put() itself might sleep. Which is
problematic due to the need to call uprobe's dealloc through call_rcu(),
which is what is done in the next bug fix patch. So solve the problem by
releasing these resources early.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20240328052426.3042617-1-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>1 parent 0379654 commit e9c856c
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3157 | 3157 | | |
3158 | 3158 | | |
3159 | 3159 | | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
3160 | 3163 | | |
3161 | 3164 | | |
3162 | 3165 | | |
3163 | 3166 | | |
3164 | 3167 | | |
3165 | 3168 | | |
3166 | 3169 | | |
3167 | | - | |
3168 | | - | |
3169 | | - | |
3170 | 3170 | | |
3171 | 3171 | | |
3172 | 3172 | | |
| |||
0 commit comments