Message ID | 20180918114822.21926-5-david@redhat.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | mm: online/offline_pages called w.o. mem_hotplug_lock | expand |
diff --git a/arch/powerpc/platforms/powernv/memtrace.c b/arch/powerpc/platforms/powernv/memtrace.c index 8f1cd4f3bfd5..ef7181d4fe68 100644 --- a/arch/powerpc/platforms/powernv/memtrace.c +++ b/arch/powerpc/platforms/powernv/memtrace.c @@ -229,9 +229,11 @@ static int memtrace_online(void) * we need to online the memory ourselves. */ if (!memhp_auto_online) { + lock_device_hotplug(); walk_memory_range(PFN_DOWN(ent->start), PFN_UP(ent->start + ent->size - 1), NULL, online_mem_block); + unlock_device_hotplug(); } /*