From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Pascal Mazon <pascal.mazon@6wind.com>
Cc: dev@dpdk.org, Keith Wiles <keith.wiles@intel.com>,
Ferruh Yigit <ferruh.yigit@intel.com>,
Vipin Varghese <vipin.varghese@intel.com>,
stable@dpdk.org
Subject: [dpdk-dev] [PATCH 2/2] net/tap: fix unregistering callback with invalid fd
Date: Mon, 18 Sep 2017 19:47:35 +0100 [thread overview]
Message-ID: <20170918184735.43968-2-ferruh.yigit@intel.com> (raw)
In-Reply-To: <20170918184735.43968-1-ferruh.yigit@intel.com>
From: Vipin Varghese <vipin.varghese@intel.com>
tap_intr_handle_set() called by tap_dev_start(), and if LSC is disabled
(dev_conf.intr_conf.lsc == 0), it tries to unregister interrupt
callback without checking the interrupt file descriptor.
Fixes: c0bddd3a057f ("net/tap: add link status notification")
Cc: stable@dpdk.org
Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
---
drivers/net/tap/rte_eth_tap.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 00dad167f..fcfd4215e 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1098,10 +1098,11 @@ tap_intr_handle_set(struct rte_eth_dev *dev, int set)
/* In any case, disable interrupt if the conf is no longer there. */
if (!dev->data->dev_conf.intr_conf.lsc) {
- if (pmd->intr_handle.fd != -1)
+ if (pmd->intr_handle.fd != -1) {
nl_final(pmd->intr_handle.fd);
- rte_intr_callback_unregister(
- &pmd->intr_handle, tap_dev_intr_handler, dev);
+ rte_intr_callback_unregister(&pmd->intr_handle,
+ tap_dev_intr_handler, dev);
+ }
return 0;
}
if (set) {
--
2.13.5
next prev parent reply other threads:[~2017-09-18 18:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 18:47 [dpdk-dev] [PATCH 1/2] net/tap: fix setting speed by argument Ferruh Yigit
2017-09-18 18:47 ` Ferruh Yigit [this message]
2017-09-19 12:46 ` [dpdk-dev] [PATCH 2/2] net/tap: fix unregistering callback with invalid fd Pascal Mazon
2017-09-20 16:05 ` Ferruh Yigit
2017-09-19 12:45 ` [dpdk-dev] [PATCH 1/2] net/tap: fix setting speed by argument Pascal Mazon
2017-10-25 1:24 ` Ferruh Yigit
2017-10-25 6:27 ` Pascal Mazon
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=20170918184735.43968-2-ferruh.yigit@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=keith.wiles@intel.com \
--cc=pascal.mazon@6wind.com \
--cc=stable@dpdk.org \
--cc=vipin.varghese@intel.com \
/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).