Skip to content
Commit c13da21c authored by Cong Wang's avatar Cong Wang Committed by David S. Miller
Browse files

tun: avoid calling xdp_rxq_info_unreg() twice



Similarly to tx ring, xdp_rxq_info is only registered
when !tfile->detached, so we need to avoid calling
xdp_rxq_info_unreg() twice too. The helper tun_cleanup_tx_ring()
already checks for this properly, so it is correct to put
xdp_rxq_info_unreg() just inside there.

Reported-by: default avatar <syzbot+1c788d7ce0f0888f1d7f@syzkaller.appspotmail.com>
Fixes: 8565d26b ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net"

)
Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 208e0b17
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment