linux_dsm_epyc7002/arch/x86/kernel/cpu
Thomas Gleixner 84393817db x86/mtrr: Prevent CPU hotplug lock recursion
Larry reported a CPU hotplug lock recursion in the MTRR code.

============================================
WARNING: possible recursive locking detected

systemd-udevd/153 is trying to acquire lock:
 (cpu_hotplug_lock.rw_sem){.+.+.+}, at: [<c030fc26>] stop_machine+0x16/0x30
 
 but task is already holding lock:
  (cpu_hotplug_lock.rw_sem){.+.+.+}, at: [<c0234353>] mtrr_add_page+0x83/0x470

....

 cpus_read_lock+0x48/0x90
 stop_machine+0x16/0x30
 mtrr_add_page+0x18b/0x470
 mtrr_add+0x3e/0x70

mtrr_add_page() holds the hotplug rwsem already and calls stop_machine()
which acquires it again.

Call stop_machine_cpuslocked() instead.

Reported-and-tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1708140920250.1865@nanos
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Borislav Petkov <bp@suse.de>
2017-08-15 13:03:47 +02:00
..
mcheck x86/mce: Always save severity in machine_check_poll() 2017-06-26 15:58:56 +02:00
microcode x86/microcode: Make a couple of symbols static 2017-06-26 15:57:37 +02:00
mtrr x86/mtrr: Prevent CPU hotplug lock recursion 2017-08-15 13:03:47 +02:00
.gitignore
amd.c x86/cpu: Use indirect call to measure performance in init_amd_k6() 2017-07-16 11:05:04 +02:00
aperfmperf.c cpufreq: x86: Make scaling_cur_freq behave more as expected 2017-07-30 14:26:51 +02:00
bugs.c x86: use set_memory.h header 2017-05-08 17:15:13 -07:00
centaur.c Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 20:51:12 -07:00
common.c x86/cpu: remove hypervisor specific set_cpu_features 2017-05-02 11:14:30 +02:00
cpu.h x86/cpu: Restore MSR_IA32_ENERGY_PERF_BIAS after resume 2015-07-21 07:51:38 +02:00
cyrix.c x86/cpu/cyrix: Add alternative Device ID of Geode GX1 SoC 2017-06-05 08:34:20 +02:00
hypervisor.c x86/cpu: remove hypervisor specific set_cpu_features 2017-05-02 11:14:30 +02:00
intel_cacheinfo.c sched/headers: Prepare to remove <linux/cred.h> inclusion from <linux/sched.h> 2017-03-02 08:42:31 +01:00
intel_rdt_rdtgroup.c x86/intel_rdt: Fix memory leak on mount failure 2017-06-30 21:20:00 +02:00
intel_rdt_schemata.c x86/intel_rdt: Return error for incorrect resource names in schemata 2017-04-20 15:57:59 +02:00
intel_rdt.c x86/intel_rdt: Fix padding when resource is enabled via mount 2017-04-20 15:57:59 +02:00
intel.c x86/arch_prctl: Add ARCH_[GET|SET]_CPUID 2017-03-20 16:10:34 +01:00
Makefile x86: use common aperfmperf_khz_on_cpu() to calculate KHz using APERF/MPERF 2017-06-27 01:47:32 +02:00
match.c x86/kernel: Audit and remove any unnecessary uses of module.h 2016-07-14 15:06:41 +02:00
mkcapflags.sh x86/cpufeature: Carve out X86_FEATURE_* 2016-01-30 11:22:17 +01:00
mshyperv.c x86/hyperv: Read TSC frequency from a synthetic MSR 2017-06-22 15:35:12 +02:00
perfctr-watchdog.c x86/kernel: Audit and remove any unnecessary uses of module.h 2016-07-14 15:06:41 +02:00
powerflags.c x86/cpu: Add advanced power management bits 2016-03-29 11:12:11 +02:00
proc.c x86: do not use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz" 2017-06-24 01:45:47 +02:00
rdrand.c x86, asm: Use CC_SET()/CC_OUT() and static_cpu_has() in archrandom.h 2016-06-08 12:41:20 -07:00
scattered.c x86/intel_rdt/mba: Memory bandwith allocation feature detect 2017-04-14 16:10:07 +02:00
topology.c x86/cpu: Convert printk(KERN_<LEVEL> ...) to pr_<level>(...) 2016-02-03 10:30:03 +01:00
transmeta.c Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-03-07 14:42:34 -08:00
umc.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
vmware.c vmware: set cpu capabilities during platform initialization 2017-05-02 11:14:24 +02:00