aboutsummaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorGravatar David Hildenbrand <david@redhat.com> 2019-04-25 22:23:37 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org> 2019-04-26 09:18:04 -0700
commit89c02e69fc5245f8a2f34b58b42d43a737af1a5e (patch)
tree106f7511c88d943bfd8abc0a42468982a46b8c11 /drivers/block
parentMerge tag 'ceph-for-5.1-rc7' of git://github.com/ceph/ceph-client (diff)
downloadlinux-89c02e69fc5245f8a2f34b58b42d43a737af1a5e.tar.gz
linux-89c02e69fc5245f8a2f34b58b42d43a737af1a5e.tar.bz2
linux-89c02e69fc5245f8a2f34b58b42d43a737af1a5e.zip
mm/memory_hotplug.c: drop memory device reference after find_memory_block()
Right now we are using find_memory_block() to get the node id for the pfn range to online. We are missing to drop a reference to the memory block device. While the device still gets unregistered via device_unregister(), resulting in no user visible problem, the device is never released via device_release(), resulting in a memory leak. Fix that by properly using a put_device(). Link: http://lkml.kernel.org/r/20190411110955.1430-1-david@redhat.com Fixes: d0dc12e86b31 ("mm/memory_hotplug: optimize memory hotplug") Signed-off-by: David Hildenbrand <david@redhat.com> Reviewed-by: Oscar Salvador <osalvador@suse.de> Reviewed-by: Wei Yang <richard.weiyang@gmail.com> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Pankaj Gupta <pagupta@redhat.com> Cc: David Hildenbrand <david@redhat.com> Cc: Pavel Tatashin <pasha.tatashin@soleen.com> Cc: Qian Cai <cai@lca.pw> Cc: Arun KS <arunks@codeaurora.org> Cc: Mathieu Malaterre <malat@debian.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block')
0 files changed, 0 insertions, 0 deletions