linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: Pavel Tatashin <pasha.tatashin@soleen.com>,
	jmorris@namei.org, sashal@kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-nvdimm@lists.01.org, akpm@linux-foundation.org,
	mhocko@suse.com, dave.hansen@linux.intel.com,
	dan.j.williams@intel.com, keith.busch@intel.com,
	vishal.l.verma@intel.com, dave.jiang@intel.com,
	zwisler@kernel.org, thomas.lendacky@amd.com,
	ying.huang@intel.com, fengguang.wu@intel.com, bp@suse.de,
	bhelgaas@google.com, baiyaowei@cmss.chinamobile.com,
	tiwai@suse.de, jglisse@redhat.com, david@redhat.com
Subject: Re: [v3 1/2] device-dax: fix memory and resource leak if hotplug fails
Date: Thu, 25 Apr 2019 11:32:15 -0700	[thread overview]
Message-ID: <67dba1e2-155c-f572-81dd-a6d589d0e8a5@intel.com> (raw)
In-Reply-To: <20190425175440.9354-2-pasha.tatashin@soleen.com>

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>

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

Thread overview: 7+ 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 18:32   ` Dave Hansen [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 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=67dba1e2-155c-f572-81dd-a6d589d0e8a5@intel.com \
    --to=dave.hansen@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=baiyaowei@cmss.chinamobile.com \
    --cc=bhelgaas@google.com \
    --cc=bp@suse.de \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dave.jiang@intel.com \
    --cc=david@redhat.com \
    --cc=fengguang.wu@intel.com \
    --cc=jglisse@redhat.com \
    --cc=jmorris@namei.org \
    --cc=keith.busch@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=mhocko@suse.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=sashal@kernel.org \
    --cc=thomas.lendacky@amd.com \
    --cc=tiwai@suse.de \
    --cc=vishal.l.verma@intel.com \
    --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 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).