mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Jason Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
303fd71b37
commit
3a4030761e
3 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue