]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memory_hotplug: Do not unlock when fails to take the device_hotplug_lock
authorzhong jiang <zhongjiang@huawei.com>
Mon, 8 Apr 2019 04:07:17 +0000 (12:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Apr 2019 17:40:20 +0000 (19:40 +0200)
commit74abb2aafd6be3d06e56e28ab3861ab56f2aa849
tree7f697973980a03e9a6c2eca663d96f48c2a7d033
parent04bf245069da50ded969d5994642434aa5468c2a
mm/memory_hotplug: Do not unlock when fails to take the device_hotplug_lock

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 6c615b6bae48
("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: 6c615b6bae48 ("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>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/memory.c