diff options
author | Xin Long <lucien.xin@gmail.com> | 2017-11-19 12:31:04 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-19 13:22:31 +0100 |
commit | 654d573845f35017dc397840fa03610fef3d08b0 (patch) | |
tree | ca78d6425d2624b845c0b57b34e1f740a5fda841 /fs/cachefiles | |
parent | tcp: when scheduling TLP, time of RTO should account for current ACK (diff) | |
download | linux-654d573845f35017dc397840fa03610fef3d08b0.tar.xz linux-654d573845f35017dc397840fa03610fef3d08b0.zip |
tun: fix rcu_read_lock imbalance in tun_build_skb
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>
Diffstat (limited to 'fs/cachefiles')
0 files changed, 0 insertions, 0 deletions