Commit 32140fa
bpf: Use rcu_trace_implies_rcu_gp() for program array freeing
To support both sleepable and normal uprobe bpf program, the freeing of
trace program array chains a RCU-tasks-trace grace period and a normal
RCU grace period one after the other.
With the introduction of rcu_trace_implies_rcu_gp(),
__bpf_prog_array_free_sleepable_cb() can check whether or not a normal
RCU grace period has also passed after a RCU-tasks-trace grace period
has passed. If it is true, it is safe to invoke kfree() directly.
Signed-off-by: Hou Tao <[email protected]>1 parent 0448657 commit 32140fa
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2251 | 2251 | | |
2252 | 2252 | | |
2253 | 2253 | | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
2254 | 2257 | | |
2255 | | - | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
2256 | 2262 | | |
2257 | 2263 | | |
2258 | 2264 | | |
| |||
0 commit comments