patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/virtio-user: fix crash when detaching device
@ 2017-06-23 12:41 Allain Legacy
  2017-07-04  9:25 ` Yuanhan Liu
  0 siblings, 1 reply; 2+ messages in thread
From: Allain Legacy @ 2017-06-23 12:41 UTC (permalink / raw)
  To: yliu, maxime.coquelin; +Cc: dev, stable

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@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)
 	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.12.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH] net/virtio-user: fix crash when detaching device
  2017-06-23 12:41 [dpdk-stable] [PATCH] net/virtio-user: fix crash when detaching device Allain Legacy
@ 2017-07-04  9:25 ` Yuanhan Liu
  0 siblings, 0 replies; 2+ messages in thread
From: Yuanhan Liu @ 2017-07-04  9:25 UTC (permalink / raw)
  To: Allain Legacy; +Cc: maxime.coquelin, dev, stable

On Fri, Jun 23, 2017 at 08:41:37AM -0400, Allain Legacy wrote:
> 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")

Note that it's prefered (and asked) to add stable tag inside the commit log.

    Cc: stable@dpdk.org

Applied to dpdk-next-virtio, with above tag added.

Thanks.

	--yliu

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-04  9:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23 12:41 [dpdk-stable] [PATCH] net/virtio-user: fix crash when detaching device Allain Legacy
2017-07-04  9:25 ` Yuanhan Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).