x86/intel_rdt: Prevent deadlock against hotplug lock
authorThomas Gleixner <tglx@linutronix.de>
Tue, 15 Nov 2016 14:12:13 +0000 (15:12 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 15 Nov 2016 17:35:49 +0000 (18:35 +0100)
commita2584e1d5a74e8f5387d6484ad4c73ded36aa2ae
treef16c84942390d22b0b4c8a8142b4466d6c101211
parentf57b308728902d9ffade53466e9201e999a870e4
x86/intel_rdt: Prevent deadlock against hotplug lock

The cpu online/offline callbacks of intel_rdt lock rdtgroup_mutex nested
inside of cpu hotplug lock. rdtgroup_cpus_write() does it in reverse order.

Remove the get/put_online_cpus() calls from rdtgroup_cpus_write(). This is
safe against cpu hotplug as the resource group cpumasks are protected by
rdtgroup_mutex.

Found by review, but should have been found if authors would have bothered
to test cpu hotplug with lockdep enabled.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Shaohua Li <shli@fb.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
arch/x86/kernel/cpu/intel_rdt_rdtgroup.c