Skip to content
Commit 091ed093 authored by zhong jiang's avatar zhong jiang Committed by Greg Kroah-Hartman
Browse files

mm/memory_hotplug: Do not unlock when fails to take the device_hotplug_lock

[ Upstream commit d2ab9940 ]

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 8df1d0e4
("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: 8df1d0e4

 ("mm/memory_hotplug: make add_memory() take the device_hotplug_lock")
Reported-by: default avatarYang yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Reviewed-by: default avatarOscar Salvador <osalvador@suse.de>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Acked-by: default avatarMichal Hocko <mhocko@suse.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 896f7398
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment