mm: validate device_hotplug is held for memory hotplug
authorDan Williams <[email protected]>
Fri, 24 Feb 2017 22:55:48 +0000 (14:55 -0800)
committerLinus Torvalds <[email protected]>
Sat, 25 Feb 2017 01:46:53 +0000 (17:46 -0800)
commit3fc21924100b13f73c734d0ce8dfcfe913fcf7a8
tree3d9f46a4936f591e5e306cf909e44fe6012efe89
parentb5d24fda9c3dce51fcb4eee459550a458eaaf1e2
mm: validate device_hotplug is held for memory hotplug

mem_hotplug_begin() assumes that it can set mem_hotplug.active_writer
and run the hotplug process without racing another thread.  Validate
this assumption with a lockdep assertion.

Link: http://lkml.kernel.org/r/148693886229.16345.1770484669403334689.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <[email protected]>
Reported-by: Ben Hutchings <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Toshi Kani <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Logan Gunthorpe <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Masayoshi Mizuma <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/base/core.c
include/linux/device.h
mm/memory_hotplug.c