* [dpdk-stable] [PATCH v2] eal: fix unlock in rte_eal_memzone_init [not found] <1544057251-17351-1-git-send-email-gfree.wind@vip.163.com> @ 2018-12-07 1:20 ` Gao Feng 2018-12-07 8:57 ` Burakov, Anatoly 0 siblings, 1 reply; 4+ messages in thread From: Gao Feng @ 2018-12-07 1:20 UTC (permalink / raw) To: dev; +Cc: anatoly.burakov, stable, Gao Feng The RTE_PROC_PRIMARY error handler lost the unlock statement in the current codes. Now unlock and return in one place to fix it. Fixes: 49df3db84883 ("memzone: replace memzone array with fbarray") Cc: stable@dpdk.org Signed-off-by: Gao Feng <davidfgao@tencent.com> --- v2: Unlock and return in one place, per Anatoly lib/librte_eal/common/eal_common_memzone.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c index b7081af..664df5b 100644 --- a/lib/librte_eal/common/eal_common_memzone.c +++ b/lib/librte_eal/common/eal_common_memzone.c @@ -365,6 +365,7 @@ int rte_eal_memzone_init(void) { struct rte_mem_config *mcfg; + int ret = 0; /* get pointer to global configuration */ mcfg = rte_eal_get_configuration()->mem_config; @@ -375,17 +376,16 @@ rte_eal_memzone_init(void) rte_fbarray_init(&mcfg->memzones, "memzone", RTE_MAX_MEMZONE, sizeof(struct rte_memzone))) { RTE_LOG(ERR, EAL, "Cannot allocate memzone list\n"); - return -1; + ret = -1; } else if (rte_eal_process_type() == RTE_PROC_SECONDARY && rte_fbarray_attach(&mcfg->memzones)) { RTE_LOG(ERR, EAL, "Cannot attach to memzone list\n"); - rte_rwlock_write_unlock(&mcfg->mlock); - return -1; + ret = -1; } rte_rwlock_write_unlock(&mcfg->mlock); - return 0; + return ret; } /* Walk all reserved memory zones */ -- 2.7.4 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] [PATCH v2] eal: fix unlock in rte_eal_memzone_init 2018-12-07 1:20 ` [dpdk-stable] [PATCH v2] eal: fix unlock in rte_eal_memzone_init Gao Feng @ 2018-12-07 8:57 ` Burakov, Anatoly 2018-12-20 11:20 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon 0 siblings, 1 reply; 4+ messages in thread From: Burakov, Anatoly @ 2018-12-07 8:57 UTC (permalink / raw) To: Gao Feng, dev; +Cc: stable, Gao Feng On 07-Dec-18 1:20 AM, Gao Feng wrote: > The RTE_PROC_PRIMARY error handler lost the unlock statement in the > current codes. Now unlock and return in one place to fix it. > > Fixes: 49df3db84883 ("memzone: replace memzone array with fbarray") > Cc: stable@dpdk.org > > Signed-off-by: Gao Feng <davidfgao@tencent.com> > --- Acked-by: Anatoly Burakov <anatoly.burakov@intel.com> -- Thanks, Anatoly ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] eal: fix unlock in rte_eal_memzone_init 2018-12-07 8:57 ` Burakov, Anatoly @ 2018-12-20 11:20 ` Thomas Monjalon 2018-12-20 11:44 ` Gao Feng 0 siblings, 1 reply; 4+ messages in thread From: Thomas Monjalon @ 2018-12-20 11:20 UTC (permalink / raw) To: Gao Feng; +Cc: dev, Burakov, Anatoly, stable, Gao Feng 07/12/2018 09:57, Burakov, Anatoly: > On 07-Dec-18 1:20 AM, Gao Feng wrote: > > The RTE_PROC_PRIMARY error handler lost the unlock statement in the > > current codes. Now unlock and return in one place to fix it. > > > > Fixes: 49df3db84883 ("memzone: replace memzone array with fbarray") > > Cc: stable@dpdk.org > > > > Signed-off-by: Gao Feng <davidfgao@tencent.com> > > --- > Acked-by: Anatoly Burakov <anatoly.burakov@intel.com> Applied, thanks I changed your author email (From:) to match the Signed-off-by one. Please configure your git to use the Tencent email if possible. Note you can have a "git From" address and use another one for sending. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v2] eal: fix unlock in rte_eal_memzone_init 2018-12-20 11:20 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon @ 2018-12-20 11:44 ` Gao Feng 0 siblings, 0 replies; 4+ messages in thread From: Gao Feng @ 2018-12-20 11:44 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev, Burakov, Anatoly, stable, Gao Feng At 2018-12-20 19:20:53, "Thomas Monjalon" <thomas@monjalon.net> wrote: >07/12/2018 09:57, Burakov, Anatoly: >> On 07-Dec-18 1:20 AM, Gao Feng wrote: >> > The RTE_PROC_PRIMARY error handler lost the unlock statement in the >> > current codes. Now unlock and return in one place to fix it. >> > >> > Fixes: 49df3db84883 ("memzone: replace memzone array with fbarray") >> > Cc: stable@dpdk.org >> > >> > Signed-off-by: Gao Feng <davidfgao@tencent.com> >> > --- >> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com> > >Applied, thanks > >I changed your author email (From:) to match the Signed-off-by one. >Please configure your git to use the Tencent email if possible. >Note you can have a "git From" address and use another one for sending. Thanks,there is one reason. Because the tencent mailbox is exchange, so I couldn't use git sendmail with tencent email. Maybe I could add two signed-off to avoid it. Best Regards Feng > > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-12-20 11:44 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1544057251-17351-1-git-send-email-gfree.wind@vip.163.com> 2018-12-07 1:20 ` [dpdk-stable] [PATCH v2] eal: fix unlock in rte_eal_memzone_init Gao Feng 2018-12-07 8:57 ` Burakov, Anatoly 2018-12-20 11:20 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon 2018-12-20 11:44 ` Gao Feng
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).