Xin Long
unread,Jan 17, 2018, 6:07:02 AM1/17/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Dmitry Vyukov, David Miller, Jason Wang, Eric Dumazet, Willem de Bruijn, Michael S. Tsirkin, netdev, LKML, syzkaller
we probably just need:
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -831,8 +831,10 @@ static int tun_attach(struct tun_struct *tun,
struct file *file,
/* Setup XDP RX-queue info, for new tfile getting attached */
err = xdp_rxq_info_reg(&tfile->xdp_rxq,
tun->dev, tfile->queue_index);
- if (err < 0)
+ if (err < 0) {
+ ptr_ring_cleanup(&tfile->tx_ring, NULL);
goto out;
+ }
will check it for sure.