summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2020-01-27 03:14:01 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2020-01-27 13:16:25 +0300
commit9719c6b98db42462bfb9aa172f017bdfd6d66c6f (patch)
treea6f7a4cd60fb300d1261a7d00599a9de4b3ea64b /net
parent42a84a8cd0ff0cbff5a4595e1304c4567a30267d (diff)
downloadlinux-9719c6b98db42462bfb9aa172f017bdfd6d66c6f.tar.xz
bpf, xdp: virtio_net use access ptr macro for xdp enable check
virtio_net currently relies on rcu critical section to access the xdp program in its xdp_xmit handler. However, the pointer to the xdp program is only used to do a NULL pointer comparison to determine if xdp is enabled or not. Use rcu_access_pointer() instead of rcu_dereference() to reflect this. Then later when we drop rcu_read critical section virtio_net will not need in special handling. Signed-off-by: John Fastabend <john.fastabend@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Link: https://lore.kernel.org/bpf/1580084042-11598-3-git-send-email-john.fastabend@gmail.com
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions