summaryrefslogtreecommitdiffstats
path: root/drivers/vhost
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2018-03-09 14:50:34 +0800
committerDavid S. Miller <davem@davemloft.net>2018-03-09 12:02:59 -0500
commit3a4030761ea88ff439030ca98e3094b9900e96b7 (patch)
treec0d48a1da4ce356c2ce2037ba1b4fc210abba7e6 /drivers/vhost
parent303fd71b37fb710b26f5ff5444029d62cfd627bd (diff)
downloadblackbird-op-linux-3a4030761ea88ff439030ca98e3094b9900e96b7.tar.gz
blackbird-op-linux-3a4030761ea88ff439030ca98e3094b9900e96b7.zip
vhost_net: examine pointer types during un-producing
After commit fc72d1d54dd9 ("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: fc72d1d54dd9 ("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>
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index efb93063fda1..8139bc70ad7d 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -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;
}
}
OpenPOWER on IntegriCloud