From: David Marchand <david.marchand@redhat.com>
To: Jim Harris <james.r.harris@intel.com>
Cc: dev <dev@dpdk.org>, Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] [PATCH] contigmem: cleanup properly when load fails
Date: Thu, 19 Mar 2020 15:41:06 +0100 [thread overview]
Message-ID: <CAJFAV8y-ZySi_Csgt1-S7Uk3z92=5ZrHybiiY_YvNZPutfvgPw@mail.gmail.com> (raw)
In-Reply-To: <20200310093156.GA1915@bricha3-MOBL.ger.corp.intel.com>
On Tue, Mar 10, 2020 at 10:32 AM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Mon, Mar 09, 2020 at 03:00:25AM -0700, Jim Harris wrote:
> > If contigmem is not able to allocate all of the
> > requested buffers, it frees whatever buffers were
> > able to be allocated up until that point.
> >
> > But the pointers are not set to NULL in that case.
> > After the load fails, the FreeBSD kernel will
> > immediately call the contigmem unload handler, which
> > tries to free the buffers again since the pointers
> > were not set to NULL.
> >
> > It's not clear that we should just rely on the unload
> > handler getting called after load failure. So let's
> > keep the existing cleanup code in the load handler,
> > but explicitly set the pointers to NULL after freeing
> > them.
Fixes: 5f51eca22489 ("contigmem: free allocated memory on error")
Cc: stable@dpdk.org
> >
> > Signed-off-by: Jim Harris <james.r.harris@intel.com>
> > ---
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>
Applied, thanks.
--
David Marchand
prev parent reply other threads:[~2020-03-19 14:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-09 10:00 Jim Harris
2020-03-10 9:31 ` Bruce Richardson
2020-03-19 12:54 ` David Marchand
2020-03-19 13:52 ` Harris, James R
2020-03-19 14:41 ` 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='CAJFAV8y-ZySi_Csgt1-S7Uk3z92=5ZrHybiiY_YvNZPutfvgPw@mail.gmail.com' \
--to=david.marchand@redhat.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=james.r.harris@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).