diff options
| author | Ingo Molnar <mingo@kernel.org> | 2017-04-11 10:47:28 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2017-04-11 10:47:28 +0200 |
| commit | b6466d53afdb0c3ca058848cd4c12e141aba0763 (patch) | |
| tree | 06da4bf69879a7a26dc78d1b4f4b47ca4aaf4c74 /mm/memory_hotplug.c | |
| parent | 4ffa3c977b5da2907eb294dc6d0259a02f2284aa (diff) | |
| parent | 7f00f388712b29005782bad7e4b25942620f3b9c (diff) | |
Merge branch 'x86/urgent' into x86/cpu, to resolve conflict
Conflicts:
arch/x86/kernel/cpu/intel_rdt_schemata.c
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/memory_hotplug.c')
| -rw-r--r-- | mm/memory_hotplug.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 295479b792ec..6fa7208bcd56 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -125,9 +125,12 @@ void put_online_mems(void) } +/* Serializes write accesses to mem_hotplug.active_writer. */ +static DEFINE_MUTEX(memory_add_remove_lock); + void mem_hotplug_begin(void) { - assert_held_device_hotplug(); + mutex_lock(&memory_add_remove_lock); mem_hotplug.active_writer = current; @@ -147,6 +150,7 @@ void mem_hotplug_done(void) mem_hotplug.active_writer = NULL; mutex_unlock(&mem_hotplug.lock); memhp_lock_release(); + mutex_unlock(&memory_add_remove_lock); } /* add this memory to iomem resource */ |
