From: Allain Legacy <allain.legacy@windriver.com>
To: <yliu@fridaylinux.org>, <maxime.coquelin@redhat.com>
Cc: <dev@dpdk.org>, <stable@dpdk.org>
Subject: [dpdk-stable] [PATCH] net/virtio-user: fix crash when detaching device
Date: Fri, 23 Jun 2017 08:41:37 -0400 [thread overview]
Message-ID: <20170623124137.61091-1-allain.legacy@windriver.com> (raw)
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
next reply other threads:[~2017-06-23 12:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-23 12:41 Allain Legacy [this message]
2017-07-04 9:25 ` Yuanhan Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170623124137.61091-1-allain.legacy@windriver.com \
--to=allain.legacy@windriver.com \
--cc=dev@dpdk.org \
--cc=maxime.coquelin@redhat.com \
--cc=stable@dpdk.org \
--cc=yliu@fridaylinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).