Commit fecef4c
tun: Assign missing bpf_net_context.
During the introduction of struct bpf_net_context handling for
XDP-redirect, the tun driver has been missed.
Jakub also pointed out that there is another call chain to
do_xdp_generic() originating from netif_receive_skb() and drivers may
use it outside from the NAPI context.
Set the bpf_net_context before invoking BPF XDP program within the TUN
driver. Set the bpf_net_context also in do_xdp_generic() if a xdp
program is available.
Reported-by: syzbot+0b5c75599f1d872bea6f@syzkaller.appspotmail.com
Reported-by: syzbot+5ae46b237278e2369cac@syzkaller.appspotmail.com
Reported-by: syzbot+c1e04a422bbc0f0f2921@syzkaller.appspotmail.com
Fixes: 401cb7d ("net: Reference bpf_redirect_info via task_struct on PREEMPT_RT.")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://patch.msgid.link/20240704144815.j8xQda5r@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 3b2aef9 commit fecef4c
2 files changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1661 | 1661 | | |
1662 | 1662 | | |
1663 | 1663 | | |
| 1664 | + | |
1664 | 1665 | | |
1665 | 1666 | | |
1666 | 1667 | | |
| |||
1700 | 1701 | | |
1701 | 1702 | | |
1702 | 1703 | | |
| 1704 | + | |
1703 | 1705 | | |
1704 | 1706 | | |
1705 | 1707 | | |
| |||
1728 | 1730 | | |
1729 | 1731 | | |
1730 | 1732 | | |
| 1733 | + | |
1731 | 1734 | | |
1732 | 1735 | | |
1733 | 1736 | | |
1734 | 1737 | | |
1735 | 1738 | | |
1736 | 1739 | | |
| 1740 | + | |
1737 | 1741 | | |
1738 | 1742 | | |
1739 | 1743 | | |
| |||
2566 | 2570 | | |
2567 | 2571 | | |
2568 | 2572 | | |
| 2573 | + | |
2569 | 2574 | | |
2570 | 2575 | | |
2571 | 2576 | | |
| |||
2574 | 2579 | | |
2575 | 2580 | | |
2576 | 2581 | | |
| 2582 | + | |
2577 | 2583 | | |
2578 | 2584 | | |
2579 | 2585 | | |
| |||
2588 | 2594 | | |
2589 | 2595 | | |
2590 | 2596 | | |
| 2597 | + | |
2591 | 2598 | | |
2592 | 2599 | | |
2593 | 2600 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5126 | 5126 | | |
5127 | 5127 | | |
5128 | 5128 | | |
| 5129 | + | |
| 5130 | + | |
5129 | 5131 | | |
5130 | 5132 | | |
5131 | 5133 | | |
5132 | 5134 | | |
5133 | 5135 | | |
| 5136 | + | |
5134 | 5137 | | |
5135 | 5138 | | |
5136 | 5139 | | |
| |||
5144 | 5147 | | |
5145 | 5148 | | |
5146 | 5149 | | |
| 5150 | + | |
5147 | 5151 | | |
5148 | 5152 | | |
5149 | 5153 | | |
5150 | 5154 | | |
5151 | 5155 | | |
| 5156 | + | |
5152 | 5157 | | |
5153 | 5158 | | |
5154 | 5159 | | |
| |||
0 commit comments