DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Jim Harris <james.r.harris@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] contigmem: cleanup properly when load fails
Date: Tue, 10 Mar 2020 09:31:56 +0000	[thread overview]
Message-ID: <20200310093156.GA1915@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <20200309100025.9022-1-james.r.harris@intel.com>

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.
> 
> Signed-off-by: Jim Harris <james.r.harris@intel.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

  reply	other threads:[~2020-03-10  9:32 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 [this message]
2020-03-19 12:54   ` David Marchand
2020-03-19 13:52     ` Harris, James R
2020-03-19 14:41   ` David Marchand

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=20200310093156.GA1915@bricha3-MOBL.ger.corp.intel.com \
    --to=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).