From: David Hildenbrand <david@redhat.com>
To: zhong jiang <zhongjiang@huawei.com>,
akpm@linux-foundation.org, rafael@kernel.org,
rafael.j.wysocki@intel.com, mhocko@suse.com, osalvador@suse.de
Cc: vbabka@suse.cz, iamjoonsoo.kim@lge.com, bsingharora@gmail.com,
gregkh@linuxfoundation.org, yangyingliang@huawei.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RESENT PATCH] mm/memory_hotplug: Do not unlock when fails to take the device_hotplug_lock
Date: Mon, 8 Apr 2019 09:05:53 +0200 [thread overview]
Message-ID: <209a8820-7f4f-c36c-2f48-ebfc31e64428@redhat.com> (raw)
In-Reply-To: <1554696437-9593-1-git-send-email-zhongjiang@huawei.com>
On 08.04.19 06:07, zhong jiang wrote:
> When adding the memory by probing memory block in sysfs interface, there is an
> obvious issue that we will unlock the device_hotplug_lock when fails to takes it.
>
> That issue was introduced in Commit 8df1d0e4a265
> ("mm/memory_hotplug: make add_memory() take the device_hotplug_lock")
>
> We should drop out in time when fails to take the device_hotplug_lock.
>
> Fixes: 8df1d0e4a265 ("mm/memory_hotplug: make add_memory() take the device_hotplug_lock")
> Reported-by: Yang yingliang <yangyingliang@huawei.com>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
> drivers/base/memory.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/memory.c b/drivers/base/memory.c
> index d9ebb89..0c9e22f 100644
> --- a/drivers/base/memory.c
> +++ b/drivers/base/memory.c
> @@ -507,7 +507,7 @@ static ssize_t probe_store(struct device *dev, struct device_attribute *attr,
>
> ret = lock_device_hotplug_sysfs();
> if (ret)
> - goto out;
> + return ret;
>
> nid = memory_add_physaddr_to_nid(phys_addr);
> ret = __add_memory(nid, phys_addr,
>
Indeed
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2019-04-08 7:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 4:07 [RESENT PATCH] mm/memory_hotplug: Do not unlock when fails to take the device_hotplug_lock zhong jiang
2019-04-08 5:42 ` Michal Hocko
2019-04-08 7:05 ` David Hildenbrand [this message]
2019-04-08 7:27 ` Oscar Salvador
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=209a8820-7f4f-c36c-2f48-ebfc31e64428@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bsingharora@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=osalvador@suse.de \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=vbabka@suse.cz \
--cc=yangyingliang@huawei.com \
--cc=zhongjiang@huawei.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).