linux-stable/arch/x86
Fenghua Yu 397e352ca9 x86/resctrl: Don't move a task to the same resource group
commit a0195f314a upstream.

Shakeel Butt reported in [1] that a user can request a task to be moved
to a resource group even if the task is already in the group. It just
wastes time to do the move operation which could be costly to send IPI
to a different CPU.

Add a sanity check to ensure that the move operation only happens when
the task is not already in the resource group.

[1] https://lore.kernel.org/lkml/CALvZod7E9zzHwenzf7objzGKsdBmVwTgEJ0nPgs0LUFU3SN5Pw@mail.gmail.com/

Fixes: e02737d5b8 ("x86/intel_rdt: Add tasks files")
Reported-by: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/962ede65d8e95be793cb61102cca37f7bb018e66.1608243147.git.reinette.chatre@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-12 20:18:23 +01:00
..
boot A set of fixes for x86: 2020-12-06 11:22:39 -08:00
configs
crypto crypto: x86/poly1305 - add back a needed assignment 2020-10-24 09:38:32 +11:00
entry A couple of x86 fixes which missed rc1 due to my stupidity: 2020-10-27 14:39:29 -07:00
events perf/x86/intel/lbr: Fix the return type of get_lbr_cycles() 2020-12-30 11:54:10 +01:00
hyperv hyperv-fixes for 5.10-rc3 2020-11-05 11:32:03 -08:00
ia32
include local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
kernel x86/resctrl: Don't move a task to the same resource group 2021-01-12 20:18:23 +01:00
kvm KVM: x86/mmu: Ensure TDP MMU roots are freed after yield 2021-01-12 20:18:22 +01:00
lib x86/insn-eval: Use new for_each_insn_prefix() macro to loop over prefixes bytes 2020-12-06 10:03:08 +01:00
math-emu
mm x86/mm: Fix leak of pmd ptlock 2021-01-12 20:18:22 +01:00
net
oprofile
pci pci-v5.10-changes 2020-10-22 12:41:00 -07:00
platform efi/x86: Free efi_pgd with free_pages() 2020-11-10 19:18:11 +01:00
power
purgatory treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
ras
realmode
tools
um arch/um: partially revert the conversion to __section() macro 2020-10-26 15:39:37 -07:00
video
xen xen: branch for v5.10-rc5 2020-11-20 10:30:48 -08:00
.gitignore
Kbuild
Kconfig kbuild: Hoist '--orphan-handling' into Kconfig 2020-12-01 22:45:36 +09:00
Kconfig.assembler
Kconfig.cpu
Kconfig.debug
Makefile kbuild: Hoist '--orphan-handling' into Kconfig 2020-12-01 22:45:36 +09:00
Makefile.um
Makefile_32.cpu