mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 13:11:14 +00:00
net/netif_receive_skb_core: Use migrate_disable()
The preempt disable around do_xdp_generic() has been introduced in commitbbbe211c29
("net: rcu lock and preempt disable missing around generic xdp") For BPF it is enough to use migrate_disable() and the code was updated as it can be seen in commit3c58482a38
("bpf: Provide bpf_prog_run_pin_on_cpu() helper") This is a leftover which was not converted. Use migrate_disable() before invoking do_xdp_generic(). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
89837eb4b2
commit
2b4cd14fd9
1 changed files with 2 additions and 2 deletions
|
@ -5277,9 +5277,9 @@ another_round:
|
|||
if (static_branch_unlikely(&generic_xdp_needed_key)) {
|
||||
int ret2;
|
||||
|
||||
preempt_disable();
|
||||
migrate_disable();
|
||||
ret2 = do_xdp_generic(rcu_dereference(skb->dev->xdp_prog), skb);
|
||||
preempt_enable();
|
||||
migrate_enable();
|
||||
|
||||
if (ret2 != XDP_PASS) {
|
||||
ret = NET_RX_DROP;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue