bpf, devmap: Add missing RCU read lock on flush
authorToshiaki Makita <toshiaki.makita1@gmail.com>
Fri, 14 Jun 2019 08:20:15 +0000 (17:20 +0900)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 14 Jun 2019 22:58:51 +0000 (00:58 +0200)
commit86723c8640633bee4b4588d3c7784ee7a0032f65
tree9cb58b03a94f6b16c7ebc41ceb88f5579bea1ff8
parentedabf4d9dd905acd60048ea1579943801e3a4876
bpf, devmap: Add missing RCU read lock on flush

.ndo_xdp_xmit() assumes it is called under RCU. For example virtio_net
uses RCU to detect it has setup the resources for tx. The assumption
accidentally broke when introducing bulk queue in devmap.

Fixes: 5d053f9da431 ("bpf: devmap prepare xdp frames for bulking")
Reported-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Toshiaki Makita <toshiaki.makita1@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/devmap.c