From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
To: dev@dpdk.org, ogawa.yasufumi@lab.ntt.co.jp
Subject: [dpdk-dev] [PATCH] vhost: delete freeing mac_addrs in eth_dev_close
Date: Tue, 18 Dec 2018 19:14:30 +0900 [thread overview]
Message-ID: <201812181015.wBIAFlYk016726@ccmail04.silk.ntt-tx.co.jp> (raw)
From: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
When rte_dev_remove is called for vhost, eth_dev_close and
rte_eth_dev_release_port is called.
Both eth_dev_close and rte_eth_dev_release_port calls rte_free
for same data area(mac_addrs) and thus causes double free.
This patch fixes this by deleting rte_free for mac_addrs.
Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@po.ntt-tx.co.jp>
---
drivers/net/vhost/rte_eth_vhost.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 42bdfcbd5..b2cda0483 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1000,7 +1000,6 @@ eth_dev_close(struct rte_eth_dev *dev)
for (i = 0; i < dev->data->nb_tx_queues; i++)
rte_free(dev->data->tx_queues[i]);
- rte_free(dev->data->mac_addrs);
free(internal->dev_name);
free(internal->iface_name);
rte_free(internal);
--
2.18.0
next reply other threads:[~2018-12-18 10:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 10:14 Hideyuki Yamashita [this message]
2018-12-18 13:02 ` Tiwei Bie
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=201812181015.wBIAFlYk016726@ccmail04.silk.ntt-tx.co.jp \
--to=yamashita.hideyuki@po.ntt-tx.co.jp \
--cc=dev@dpdk.org \
--cc=ogawa.yasufumi@lab.ntt.co.jp \
/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).