Thread (2 messages) 2 messages, 2 authors, 2017-08-18

Re: [net-next PATCH] net: rcu lock and preempt disable missing around generic xdp

flat view

From: David Miller <davem@davemloft.net>
Date: 2017-08-18 23:05:00

From: John Fastabend <john.fastabend@gmail.com>
Date: Wed, 16 Aug 2017 11:33:19 -0700
do_xdp_generic must be called inside rcu critical section with preempt
disabled to ensure BPF programs are valid and per-cpu variables used
for redirect operations are consistent. This patch ensures this is true
and fixes the splat below.

The netif_receive_skb_internal() code path is now broken into two rcu
critical sections. I decided it was better to limit the preempt_enable/disable
block to just the xdp static key portion and the fallout is more
rcu_read_lock/unlock calls. Seems like the best option to me.
 ...
Fixes: d445516966dc ("net: xdp: support xdp generic on virtual devices")
Fixes: b5cdae3291f7 ("net: Generic XDP")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
John you'll need to respin this as these code blocks have changed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help