DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Harris, James R" <james.r.harris@intel.com>
To: David Marchand <david.marchand@redhat.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>
Cc: dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] contigmem: cleanup properly when load fails
Date: Thu, 19 Mar 2020 13:52:32 +0000	[thread overview]
Message-ID: <924C7DF4-B00E-4927-A8DF-E40965091A8D@intel.com> (raw)
In-Reply-To: <CAJFAV8ztKn3-P6d2=X040dgf+HBYVPSvA_ptYiFiAWsDORQn=w@mail.gmail.com>



On 3/19/20, 5:54 AM, "David Marchand" <david.marchand@redhat.com> wrote:

    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.
    
    Can you check this Fixes is correct?
    
    Fixes: 5f51eca22489 ("contigmem: free allocated memory on error")
    Cc: stable@dpdk.org
    
Yes - that's correct.  Thanks!

-Jim
    


  reply	other threads:[~2020-03-19 13:52 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 [this message]
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=924C7DF4-B00E-4927-A8DF-E40965091A8D@intel.com \
    --to=james.r.harris@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    /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).