All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Tatashin <pasha.tatashin@soleen.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: "Michal Hocko" <mhocko@suse.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Takashi Iwai" <tiwai@suse.de>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	linux-mm <linux-mm@kvack.org>,
	"Yaowei Bai" <baiyaowei@cmss.chinamobile.com>,
	"Ross Zwisler" <zwisler@kernel.org>,
	"Sasha Levin" <sashal@kernel.org>,
	linux-nvdimm <linux-nvdimm@lists.01.org>,
	"James Morris" <jmorris@namei.org>,
	"Huang, Ying" <ying.huang@intel.com>,
	"Borislav Petkov" <bp@suse.de>,
	"Tom Lendacky" <thomas.lendacky@amd.com>,
	"Jérôme Glisse" <jglisse@redhat.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Fengguang Wu" <fengguang.wu@intel.com>
Subject: Re: [v3 1/2] device-dax: fix memory and resource leak if hotplug fails
Date: Thu, 25 Apr 2019 14:51:37 -0400	[thread overview]
Message-ID: <CA+CK2bC5G0DrBpHuaV5xrAAZUKHVwN2N++eiV++SH2gvvbKGHA@mail.gmail.com> (raw)
In-Reply-To: <67dba1e2-155c-f572-81dd-a6d589d0e8a5@intel.com>

On Thu, Apr 25, 2019 at 2:32 PM Dave Hansen <dave.hansen@intel.com> wrote:
>
> On 4/25/19 10:54 AM, Pavel Tatashin wrote:
> >       rc = add_memory(numa_node, new_res->start, resource_size(new_res));
> > -     if (rc)
> > +     if (rc) {
> > +             release_resource(new_res);
> > +             kfree(new_res);
> >               return rc;
> > +     }
>
> Looks good to me:
>
> Reviewed-by: Dave Hansen <dave.hansen@intel.com>

Thank you Dave.

Pasha
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

WARNING: multiple messages have this Message-ID (diff)
From: Pavel Tatashin <pasha.tatashin@soleen.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: "James Morris" <jmorris@namei.org>,
	"Sasha Levin" <sashal@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	linux-nvdimm <linux-nvdimm@lists.01.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Michal Hocko" <mhocko@suse.com>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Keith Busch" <keith.busch@intel.com>,
	"Vishal L Verma" <vishal.l.verma@intel.com>,
	"Dave Jiang" <dave.jiang@intel.com>,
	"Ross Zwisler" <zwisler@kernel.org>,
	"Tom Lendacky" <thomas.lendacky@amd.com>,
	"Huang, Ying" <ying.huang@intel.com>,
	"Fengguang Wu" <fengguang.wu@intel.com>,
	"Borislav Petkov" <bp@suse.de>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Yaowei Bai" <baiyaowei@cmss.chinamobile.com>,
	"Takashi Iwai" <tiwai@suse.de>,
	"Jérôme Glisse" <jglisse@redhat.com>,
	"David Hildenbrand" <david@redhat.com>
Subject: Re: [v3 1/2] device-dax: fix memory and resource leak if hotplug fails
Date: Thu, 25 Apr 2019 14:51:37 -0400	[thread overview]
Message-ID: <CA+CK2bC5G0DrBpHuaV5xrAAZUKHVwN2N++eiV++SH2gvvbKGHA@mail.gmail.com> (raw)
In-Reply-To: <67dba1e2-155c-f572-81dd-a6d589d0e8a5@intel.com>

On Thu, Apr 25, 2019 at 2:32 PM Dave Hansen <dave.hansen@intel.com> wrote:
>
> On 4/25/19 10:54 AM, Pavel Tatashin wrote:
> >       rc = add_memory(numa_node, new_res->start, resource_size(new_res));
> > -     if (rc)
> > +     if (rc) {
> > +             release_resource(new_res);
> > +             kfree(new_res);
> >               return rc;
> > +     }
>
> Looks good to me:
>
> Reviewed-by: Dave Hansen <dave.hansen@intel.com>

Thank you Dave.

Pasha

  reply	other threads:[~2019-04-25 18:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 17:54 [v3 0/2] "Hotremove" persistent memory Pavel Tatashin
2019-04-25 17:54 ` [v3 1/2] device-dax: fix memory and resource leak if hotplug fails Pavel Tatashin
2019-04-25 17:54   ` Pavel Tatashin
2019-04-25 18:32   ` Dave Hansen
2019-04-25 18:32     ` Dave Hansen
2019-04-25 18:51     ` Pavel Tatashin [this message]
2019-04-25 18:51       ` Pavel Tatashin
2019-04-25 17:54 ` [v3 2/2] device-dax: "Hotremove" persistent memory that is used like normal RAM Pavel Tatashin
2019-04-25 17:54   ` Pavel Tatashin
2019-04-25 19:01   ` Dave Hansen
2019-04-25 19:01     ` Dave Hansen
2019-04-25 20:21     ` Pavel Tatashin

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=CA+CK2bC5G0DrBpHuaV5xrAAZUKHVwN2N++eiV++SH2gvvbKGHA@mail.gmail.com \
    --to=pasha.tatashin@soleen.com \
    --cc=akpm@linux-foundation.org \
    --cc=baiyaowei@cmss.chinamobile.com \
    --cc=bhelgaas@google.com \
    --cc=bp@suse.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=david@redhat.com \
    --cc=fengguang.wu@intel.com \
    --cc=jglisse@redhat.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=mhocko@suse.com \
    --cc=sashal@kernel.org \
    --cc=thomas.lendacky@amd.com \
    --cc=tiwai@suse.de \
    --cc=ying.huang@intel.com \
    --cc=zwisler@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.