[dpdk-dev] [PATCH] net/virtio-user: fix crash when detaching device

Allain Legacy allain.legacy at windriver.com
Fri Jun 23 14:41:37 CEST 2017

The rte_eth_dev.data pointer is set to a reference to a static table.
Attempting to rte_free() it leads to a panic.  For example, the
following commands result in a panic if run in testpmd

  testpmd> port attach virtio_user0,path=/dev/vhost-net,iface=test0
  testpmd> port stop 2
  testpmd> port close 2
  testpmd> port detach 2

Fixes: ce2eabdd43ec ("net/virtio-user: add virtual device")

Signed-off-by: Allain Legacy <allain.legacy at windriver.com>
 drivers/net/virtio/virtio_user_ethdev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index 280406c02..e9af946e8 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -556,7 +556,6 @@ virtio_user_pmd_remove(struct rte_vdev_device *vdev)
-	rte_free(eth_dev->data);
 	return 0;

More information about the dev mailing list