Commit fe946a7
net/sched: act_mirred: add loop detection
Commit 0f022d3 ("net/sched: Fix mirred deadlock on device recursion")
added code in the fast path, even when act_mirred is not used.
Prepare its revert by implementing loop detection in act_mirred.
Adds an array of device pointers in struct netdev_xmit.
tcf_mirred_is_act_redirect() can detect if the array
already contains the target device.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Tested-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://patch.msgid.link/20251014171907.3554413-4-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 5b2b7de commit fe946a7
2 files changed
+31
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
6 | 12 | | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
11 | 17 | | |
12 | | - | |
| 18 | + | |
| 19 | + | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 32 | | |
58 | 33 | | |
59 | 34 | | |
| |||
439 | 414 | | |
440 | 415 | | |
441 | 416 | | |
442 | | - | |
| 417 | + | |
443 | 418 | | |
444 | 419 | | |
445 | | - | |
| 420 | + | |
446 | 421 | | |
447 | 422 | | |
448 | | - | |
449 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
450 | 429 | | |
451 | 430 | | |
452 | | - | |
453 | | - | |
| 431 | + | |
454 | 432 | | |
455 | 433 | | |
456 | 434 | | |
457 | 435 | | |
458 | 436 | | |
459 | 437 | | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
| 438 | + | |
| 439 | + | |
464 | 440 | | |
465 | 441 | | |
466 | 442 | | |
467 | 443 | | |
468 | 444 | | |
469 | | - | |
| 445 | + | |
470 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
471 | 457 | | |
472 | 458 | | |
473 | 459 | | |
474 | 460 | | |
475 | 461 | | |
476 | 462 | | |
477 | | - | |
478 | | - | |
479 | | - | |
| 463 | + | |
480 | 464 | | |
481 | 465 | | |
482 | 466 | | |
| |||
0 commit comments