xdp: fix bug in devmap teardown code path
authorJesper Dangaard Brouer <brouer@redhat.com>
Wed, 8 Aug 2018 21:00:45 +0000 (23:00 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 9 Aug 2018 19:50:44 +0000 (21:50 +0200)
commit1bf9116d0866a649104a5dfa008c302ad54d1e02
treee758a1cbc47dcaff5e9c13ee2b336dd48994c881
parent37d7ff25957e05860e068a986209fee128db574a
xdp: fix bug in devmap teardown code path

Like cpumap teardown, the devmap teardown code also flush remaining
xdp_frames, via bq_xmit_all() in case map entry is removed.  The code
can call xdp_return_frame_rx_napi, from the the wrong context, in-case
ndo_xdp_xmit() fails.

Fixes: 389ab7f01af9 ("xdp: introduce xdp_return_frame_rx_napi")
Fixes: 735fc4054b3a ("xdp: change ndo_xdp_xmit API to support bulking")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/devmap.c