DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/kni: fix return value check
@ 2019-04-23 15:43 Ferruh Yigit
  2019-04-23 15:43 ` Ferruh Yigit
  2019-04-24 16:49 ` Ferruh Yigit
  0 siblings, 2 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-04-23 15:43 UTC (permalink / raw)
  To: dev; +Cc: stable

'rte_kni_release()' return value is not checked, adding it.

Coverity issue: 336837
Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/kni/rte_eth_kni.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 89f44737c..1f232e4da 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -459,6 +459,7 @@ eth_kni_remove(struct rte_vdev_device *vdev)
 	struct rte_eth_dev *eth_dev;
 	struct pmd_internals *internals;
 	const char *name;
+	int ret;
 
 	name = rte_vdev_device_name(vdev);
 	PMD_LOG(INFO, "Un-Initializing eth_kni for %s", name);
@@ -477,7 +478,9 @@ eth_kni_remove(struct rte_vdev_device *vdev)
 	eth_kni_dev_stop(eth_dev);
 
 	internals = eth_dev->data->dev_private;
-	rte_kni_release(internals->kni);
+	ret = rte_kni_release(internals->kni);
+	if (ret)
+		PMD_LOG(WARNING, "Not able to release kni for %s", name);
 
 	rte_eth_dev_release_port(eth_dev);
 
-- 
2.20.1

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

* [dpdk-dev] [PATCH] net/kni: fix return value check
  2019-04-23 15:43 [dpdk-dev] [PATCH] net/kni: fix return value check Ferruh Yigit
@ 2019-04-23 15:43 ` Ferruh Yigit
  2019-04-24 16:49 ` Ferruh Yigit
  1 sibling, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-04-23 15:43 UTC (permalink / raw)
  To: dev; +Cc: stable

'rte_kni_release()' return value is not checked, adding it.

Coverity issue: 336837
Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/kni/rte_eth_kni.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c
index 89f44737c..1f232e4da 100644
--- a/drivers/net/kni/rte_eth_kni.c
+++ b/drivers/net/kni/rte_eth_kni.c
@@ -459,6 +459,7 @@ eth_kni_remove(struct rte_vdev_device *vdev)
 	struct rte_eth_dev *eth_dev;
 	struct pmd_internals *internals;
 	const char *name;
+	int ret;
 
 	name = rte_vdev_device_name(vdev);
 	PMD_LOG(INFO, "Un-Initializing eth_kni for %s", name);
@@ -477,7 +478,9 @@ eth_kni_remove(struct rte_vdev_device *vdev)
 	eth_kni_dev_stop(eth_dev);
 
 	internals = eth_dev->data->dev_private;
-	rte_kni_release(internals->kni);
+	ret = rte_kni_release(internals->kni);
+	if (ret)
+		PMD_LOG(WARNING, "Not able to release kni for %s", name);
 
 	rte_eth_dev_release_port(eth_dev);
 
-- 
2.20.1


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

* Re: [dpdk-dev] [PATCH] net/kni: fix return value check
  2019-04-23 15:43 [dpdk-dev] [PATCH] net/kni: fix return value check Ferruh Yigit
  2019-04-23 15:43 ` Ferruh Yigit
@ 2019-04-24 16:49 ` Ferruh Yigit
  2019-04-24 16:49   ` Ferruh Yigit
  1 sibling, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2019-04-24 16:49 UTC (permalink / raw)
  To: dev; +Cc: stable

On 4/23/2019 4:43 PM, Ferruh Yigit wrote:
> 'rte_kni_release()' return value is not checked, adding it.
> 
> Coverity issue: 336837
> Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.

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

* Re: [dpdk-dev] [PATCH] net/kni: fix return value check
  2019-04-24 16:49 ` Ferruh Yigit
@ 2019-04-24 16:49   ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-04-24 16:49 UTC (permalink / raw)
  To: dev; +Cc: stable

On 4/23/2019 4:43 PM, Ferruh Yigit wrote:
> 'rte_kni_release()' return value is not checked, adding it.
> 
> Coverity issue: 336837
> Fixes: 75e2bc54c018 ("net/kni: add KNI PMD")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2019-04-24 16:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-23 15:43 [dpdk-dev] [PATCH] net/kni: fix return value check Ferruh Yigit
2019-04-23 15:43 ` Ferruh Yigit
2019-04-24 16:49 ` Ferruh Yigit
2019-04-24 16:49   ` Ferruh Yigit

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