eal: fix mapping leak in secondary process
Have rte_eal_config_reattach clean up the mapped address which is a valid address but not the one intended. Coverity issue: 343439 Fixes:4e8854ae89
("eal: do not panic on shared memory init") Fixes:b149a70642
("eal/freebsd: add config reattach in secondary process") Cc: stable@dpdk.org Signed-off-by: Arnon Warshavsky <arnon@qwilt.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
This commit is contained in:
parent
773a860aef
commit
75dbb45f28
@ -340,6 +340,7 @@ rte_eal_config_reattach(void)
|
||||
/* errno is stale, don't use */
|
||||
RTE_LOG(ERR, EAL, "Cannot mmap memory for rte_config at [%p], got [%p]\n",
|
||||
rte_mem_cfg_addr, mem_config);
|
||||
munmap(mem_config, sizeof(struct rte_mem_config));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -437,6 +437,7 @@ rte_eal_config_reattach(void)
|
||||
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",
|
||||
|
Loading…
Reference in New Issue
Block a user