]> git.baikalelectronics.ru Git - kernel.git/commit
x86/intel_rdt: Call intel_rdt_sched_in() with preemption disabled
authorFenghua Yu <fenghua.yu@intel.com>
Thu, 1 Dec 2016 20:55:14 +0000 (12:55 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 2 Dec 2016 00:13:02 +0000 (01:13 +0100)
commit16493637cb2a135dfb5be7533d9fcd2c11073bc9
treea742dd6c925c16c6fda8d3c34393b4ec19db8db7
parent29b91c4c3537580dc49c10db5d6e443a55888752
x86/intel_rdt: Call intel_rdt_sched_in() with preemption disabled

intel_rdt_sched_in() must be called with preemption disabled because the
function accesses percpu variables (pqr_state and closid).

If a task moves itself via move_myself() preemption is enabled, which
violates the calling convention and can result in incorrect closid
selection when the task gets preempted or migrated.

Add the required protection and a comment about the calling convention.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Cc: "Ravi V Shankar" <ravi.v.shankar@intel.com>
Cc: "Tony Luck" <tony.luck@intel.com>
Cc: "Marcelo Tosatti" <mtosatti@redhat.com>
Cc: "Sai Prakhya" <sai.praneeth.prakhya@intel.com>
Cc: "Vikas Shivappa" <vikas.shivappa@linux.intel.com>
Cc: "H. Peter Anvin" <h.peter.anvin@intel.com>
Link: http://lkml.kernel.org/r/1480625714-54246-1-git-send-email-fenghua.yu@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/include/asm/intel_rdt.h
arch/x86/kernel/cpu/intel_rdt_rdtgroup.c