DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: unmap undesired address upon config reattach failure
@ 2019-08-18  6:47 Arnon Warshavsky
  2019-08-19  8:27 ` David Marchand
  2019-08-19 13:57 ` [dpdk-dev] [PATCH v2] " Arnon Warshavsky
  0 siblings, 2 replies; 6+ messages in thread
From: Arnon Warshavsky @ 2019-08-18  6:47 UTC (permalink / raw)
  To: dev; +Cc: arnonw, john.mcnamara, Arnon Warshavsky

Have rte_eal_config_reattach clean up the mapped address
which is a valid address but not the one intended.

Coverity issue: 343439
Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
---
 lib/librte_eal/linux/eal/eal.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c
index 946222c..fac69b9 100644
--- a/lib/librte_eal/linux/eal/eal.c
+++ b/lib/librte_eal/linux/eal/eal.c
@@ -438,6 +438,7 @@ enum rte_iova_mode
 			RTE_LOG(ERR, EAL, "Cannot mmap memory for rte_config at [%p], got [%p]"
 				" - please use '--base-virtaddr' option\n",
 				rte_mem_cfg_addr, mem_config);
+			munmap(mem_config, sizeof(struct rte_mem_config));
 			return -1;
 		}
 		RTE_LOG(ERR, EAL, "Cannot mmap memory for rte_config! error %i (%s)\n",
-- 
1.8.3.1


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

end of thread, other threads:[~2019-10-15 18:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-18  6:47 [dpdk-dev] [PATCH] eal: unmap undesired address upon config reattach failure Arnon Warshavsky
2019-08-19  8:27 ` David Marchand
2019-08-19 13:57 ` [dpdk-dev] [PATCH v2] " Arnon Warshavsky
2019-08-19 14:48   ` Burakov, Anatoly
2019-08-19 15:29   ` David Marchand
2019-10-15 18:39     ` David Marchand

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