diff options
author | Xin Long <lucien.xin@gmail.com> | 2017-11-19 19:31:04 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-17 15:07:58 +0100 |
commit | 29d631e5941366ee5eb50b3b592ca99186115a63 (patch) | |
tree | 938103a4f850f7e4ad4f157351c0bedf937d1c59 /include/linux/virtio_net.h | |
parent | 7afe2e668ee2b1f465dcccb942da9d8f8d873f20 (diff) |
tun: fix rcu_read_lock imbalance in tun_build_skb
[ Upstream commit 654d573845f35017dc397840fa03610fef3d08b0 ]
rcu_read_lock in tun_build_skb is used to rcu_dereference tun->xdp_prog
safely, rcu_read_unlock should be done in every return path.
Now I could see one place missing it, where it returns NULL in switch-case
XDP_REDIRECT, another palce using rcu_read_lock wrongly, where it returns
NULL in if (xdp_xmit) chunk.
So fix both in this patch.
Fixes: 761876c857cb ("tap: XDP support")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/virtio_net.h')
0 files changed, 0 insertions, 0 deletions