DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: Arnon Warshavsky <arnon@qwilt.com>
Cc: dev <dev@dpdk.org>, "Mcnamara, John" <john.mcnamara@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] eal: unmap undesired address upon config reattach failure
Date: Tue, 15 Oct 2019 20:39:28 +0200	[thread overview]
Message-ID: <CAJFAV8xmzhfmfkETUXz4rhj81Pqf-1tkjtYX-bm7g9_V3+61fw@mail.gmail.com> (raw)
In-Reply-To: <CAJFAV8x4W=8E4WpgowD-_rzHug5Z654h2GLVz3Yp_6DLzEaY7w@mail.gmail.com>

On Mon, Aug 19, 2019 at 5:29 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Mon, Aug 19, 2019 at 3:58 PM Arnon Warshavsky <arnon@qwilt.com> wrote:
> >
> > Have rte_eal_config_reattach clean up the mapped address
> > which is a valid address but not the one intended.
> >
> > Coverity issue: 343439
> > Fixes: 4e8854ae89fa ("eal: do not panic on shared memory init")
> > Fixes: b149a7064261 ("eal/freebsd: add config reattach in secondary")

Fixed this title.

> > Signed-off-by: Arnon Warshavsky <arnon@qwilt.com>
> > ---
> >
> > -v2 added fixes messages and applied also to freebsd
> >
> >  lib/librte_eal/freebsd/eal/eal.c | 1 +
> >  lib/librte_eal/linux/eal/eal.c   | 1 +
> >  2 files changed, 2 insertions(+)
> >
> > diff --git a/lib/librte_eal/freebsd/eal/eal.c b/lib/librte_eal/freebsd/eal/eal.c
> > index d53f0fe..963db76 100644
> > --- a/lib/librte_eal/freebsd/eal/eal.c
> > +++ b/lib/librte_eal/freebsd/eal/eal.c
> > @@ -341,6 +341,7 @@ enum rte_iova_mode
> >                 /* 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;
> >         }
> >
> > 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
> >
>
> Thanks Arnon.
> Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks.


--
David Marchand


      reply	other threads:[~2019-10-15 18:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-18  6:47 [dpdk-dev] [PATCH] " 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 message]

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=CAJFAV8xmzhfmfkETUXz4rhj81Pqf-1tkjtYX-bm7g9_V3+61fw@mail.gmail.com \
    --to=david.marchand@redhat.com \
    --cc=arnon@qwilt.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@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).