Skip to content
Commit 713a98d9 authored by Jason Wang's avatar Jason Wang Committed by David S. Miller
Browse files

virtio-net: serialize tx routine during reset



We don't hold any tx lock when trying to disable TX during reset, this
would lead a use after free since ndo_start_xmit() tries to access
the virtqueue which has already been freed. Fix this by using
netif_tx_disable() before freeing the vqs, this could make sure no tx
after vq freeing.

Reported-by: default avatarJean-Philippe Menil <jpmenil@gmail.com>
Tested-by: default avatarJean-Philippe Menil <jpmenil@gmail.com>
Fixes commit f600b690

 ("virtio_net: Add XDP support")
Cc: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarRobert McCabe <robert.mccabe@rockwellcollins.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e20bd60b
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