vhost_net: examine pointer types during un-producing
After commitfc72d1d54d
("tuntap: XDP transmission"), we can actually queueing XDP pointers in the pointer ring, so we should examine the pointer type before freeing the pointer. Fixes:fc72d1d54d
("tuntap: XDP transmission") Reported-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
303fd71b37
commit
3a4030761e
@@ -170,7 +170,7 @@ static void vhost_net_buf_unproduce(struct vhost_net_virtqueue *nvq)
|
||||
if (nvq->rx_ring && !vhost_net_buf_is_empty(rxq)) {
|
||||
ptr_ring_unconsume(nvq->rx_ring, rxq->queue + rxq->head,
|
||||
vhost_net_buf_get_size(rxq),
|
||||
__skb_array_destroy_skb);
|
||||
tun_ptr_free);
|
||||
rxq->head = rxq->tail = 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user