Message ID | 20210617073817.vioupupx2gohyrxr@linutronix.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 2b4cd14fd995e0a863b2ced4cba0bcd804d89ebc |
Delegated to: | BPF |
Headers | show |
Series | [net-next] net/netif_receive_skb_core: Use migrate_disable() | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 5 maintainers not CCed: weiwan@google.com ap420073@gmail.com alobakin@pm.me atenart@kernel.org edumazet@google.com |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 6 this patch: 6 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 11 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 6 this patch: 6 |
netdev/header_inline | success | Link |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 17 Jun 2021 09:38:17 +0200 you wrote: > The preempt disable around do_xdp_generic() has been introduced in > commit > bbbe211c295ff ("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 commit > 3c58482a382ba ("bpf: Provide bpf_prog_run_pin_on_cpu() helper") > > [...] Here is the summary with links: - [net-next] net/netif_receive_skb_core: Use migrate_disable() https://git.kernel.org/netdev/net/c/2b4cd14fd995 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/net/core/dev.c b/net/core/dev.c index 50531a2d0b20d..e597371281638 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5277,9 +5277,9 @@ static int __netif_receive_skb_core(struct sk_buff **pskb, bool pfmemalloc, 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;
The preempt disable around do_xdp_generic() has been introduced in commit bbbe211c295ff ("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 commit 3c58482a382ba ("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> --- net/core/dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)