Message ID | 20210629093907.573598-1-toke@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 0fc4dcc13f090c941abfab453a24945a4005b350 |
Delegated to: | BPF |
Headers | show |
Series | [bpf-next,v2] bpf/devmap: convert remaining READ_ONCE() to rcu_dereference_check() | 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 bpf-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | fail | 1 blamed authors not CCed: daniel@iogearbox.net; 9 maintainers not CCed: yhs@fb.com kpsingh@kernel.org daniel@iogearbox.net andrii@kernel.org hawk@kernel.org ast@kernel.org john.fastabend@gmail.com songliubraving@fb.com davem@davemloft.net |
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: 3 this patch: 1 |
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, 18 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 3 this patch: 1 |
netdev/header_inline | success | Link |
On Tue, Jun 29, 2021 at 11:39:07AM +0200, Toke Høiland-Jørgensen wrote: > There were a couple of READ_ONCE()-invocations left-over by the devmap RCU > conversion. Convert these to rcu_dereference_check() as well to avoid > complaints from sparse. > > v2: > - Use rcu_dereference_check() Acked-by: Martin KaFai Lau <kafai@fb.com>
Hello: This patch was applied to bpf/bpf.git (refs/heads/master): On Tue, 29 Jun 2021 11:39:07 +0200 you wrote: > There were a couple of READ_ONCE()-invocations left-over by the devmap RCU > conversion. Convert these to rcu_dereference_check() as well to avoid > complaints from sparse. > > v2: > - Use rcu_dereference_check() > > [...] Here is the summary with links: - [bpf-next,v2] bpf/devmap: convert remaining READ_ONCE() to rcu_dereference_check() https://git.kernel.org/bpf/bpf/c/0fc4dcc13f09 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c index 2f6bd75cd682..e4ebe70cf201 100644 --- a/kernel/bpf/devmap.c +++ b/kernel/bpf/devmap.c @@ -558,7 +558,8 @@ int dev_map_enqueue_multi(struct xdp_buff *xdp, struct net_device *dev_rx, if (map->map_type == BPF_MAP_TYPE_DEVMAP) { for (i = 0; i < map->max_entries; i++) { - dst = READ_ONCE(dtab->netdev_map[i]); + dst = rcu_dereference_check(dtab->netdev_map[i], + rcu_read_lock_bh_held()); if (!is_valid_dst(dst, xdp, exclude_ifindex)) continue; @@ -654,7 +655,8 @@ int dev_map_redirect_multi(struct net_device *dev, struct sk_buff *skb, if (map->map_type == BPF_MAP_TYPE_DEVMAP) { for (i = 0; i < map->max_entries; i++) { - dst = READ_ONCE(dtab->netdev_map[i]); + dst = rcu_dereference_check(dtab->netdev_map[i], + rcu_read_lock_bh_held()); if (!dst || dst->dev->ifindex == exclude_ifindex) continue;