Repository navigation
Commit 8d829bd
bpf, cls: consolidate prog deletion path
Commit 18cdb37 ("net: sched: do not use tcf_proto 'tp' argument from
call_rcu") removed the last usage of tp from cls_bpf_delete_prog(), so also
remove it from the function as argument to not give a wrong impression. tp
is illegal to access from this callback, since it could already have been
freed.
Refactor the deletion code a bit, so that cls_bpf_destroy() can call into
the same code for prog deletion as cls_bpf_delete() op, instead of having
it unnecessarily duplicated.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 1afaf66 commit 8d829bd
1 file changed
Lines changed: 13 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
259 | 259 | | |
260 | | - | |
261 | | - | |
262 | | - | |
| 260 | + | |
263 | 261 | | |
264 | 262 | | |
265 | | - | |
| 263 | + | |
266 | 264 | | |
267 | | - | |
268 | | - | |
269 | 265 | | |
270 | 266 | | |
271 | 267 | | |
272 | | - | |
| 268 | + | |
| 269 | + | |
273 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
| 285 | + | |
| 286 | + | |
291 | 287 | | |
292 | 288 | | |
293 | 289 | | |
| |||
511 | 507 | | |
512 | 508 | | |
513 | 509 | | |
514 | | - | |
| 510 | + | |
515 | 511 | | |
516 | 512 | | |
517 | 513 | | |
518 | 514 | | |
519 | 515 | | |
520 | 516 | | |
521 | | - | |
| 517 | + | |
522 | 518 | | |
523 | 519 | | |
524 | 520 | | |
| |||
0 commit comments