[dpdk-stable] patch 'net/virtio-user: fix crash when detaching device' has been queued to LTS release 16.11.3
Yuanhan Liu
yliu at fridaylinux.org
Fri Jul 14 12:34:08 CEST 2017
Hi,
FYI, your patch has been queued to LTS release 16.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/19/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 3408bd4476dba421003947c950b98690738f26d7 Mon Sep 17 00:00:00 2001
From: Allain Legacy <allain.legacy at windriver.com>
Date: Fri, 23 Jun 2017 08:41:37 -0400
Subject: [PATCH] net/virtio-user: fix crash when detaching device
[ upstream commit 2a7b7d837ff70b6a58221924aa885eb0daf7f2c9 ]
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>
Acked-by: Yuanhan Liu <yuanhan.liu at linux.intel.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 f018724..b1bd623 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -479,7 +479,6 @@ virtio_user_pmd_remove(const char *name)
virtio_user_dev_uninit(dev);
rte_free(eth_dev->data->dev_private);
- rte_free(eth_dev->data);
rte_eth_dev_release_port(eth_dev);
return 0;
--
2.7.4
More information about the stable
mailing list