linux-uconsole/arch/x86
Shakeel Butt bb8e8f427f x86/resctrl: Fix potential memory leak
commit ab6a211443 upstream.

set_cache_qos_cfg() is leaking memory when the given level is not
RDT_RESOURCE_L3 or RDT_RESOURCE_L2. At the moment, this function is
called with only valid levels but move the allocation after the valid
level checks in order to make it more robust and future proof.

 [ bp: Massage commit message. ]

Fixes: 99adde9b37 ("x86/intel_rdt: Enable L2 CDP in MSR IA32_L2_QOS_CFG")
Signed-off-by: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20200102165844.133133-1-shakeelb@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-23 08:21:30 +01:00
..
boot x86/efistub: Disable paging at mixed mode entry 2020-01-23 08:21:30 +01:00
configs
crypto crypto: x86/crct10dif-pcl - fix use via crypto_shash_digest() 2019-05-22 07:37:37 +02:00
entry x86/entry/64: Use JMP instead of JMPQ 2019-08-06 19:06:58 +02:00
events perf/x86/intel: Fix PT PMI handling 2020-01-12 12:17:19 +01:00
hyperv x86/hyperv: Suppress "PCI: Fatal: No config space access function found" 2019-11-20 18:47:43 +01:00
ia32 x86/ia32: Fix ia32_restore_sigcontext() AC leak 2019-05-31 06:46:27 -07:00
include x86/crash: Add a forward declaration of struct kimage 2019-12-31 16:36:02 +01:00
kernel x86/resctrl: Fix potential memory leak 2020-01-23 08:21:30 +01:00
kvm KVM: x86: fix out-of-bounds write in KVM_GET_EMULATED_CPUID (CVE-2019-19332) 2019-12-13 08:52:58 +01:00
lib x86/insn: Add some Intel instructions to the opcode map 2019-12-31 16:36:08 +01:00
math-emu x86: math-emu: Hide clang warnings for 16-bit overflow 2019-08-06 19:06:51 +02:00
mm x86/mm: Use the correct function type for native_set_fixmap() 2019-12-31 16:35:12 +01:00
net bpf, x32: Fix bug for BPF_JMP | {BPF_JSGT, BPF_JSLE, BPF_JSLT, BPF_JSGE} 2019-11-24 08:19:17 +01:00
oprofile
pci x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect 2019-12-13 08:52:40 +01:00
platform x86/efi: Update e820 with reserved EFI boot services data to fix kexec breakage 2020-01-12 12:17:06 +01:00
power PM / hibernate: Check the success of generating md5 digest before hibernation 2019-11-24 08:19:56 +01:00
purgatory x86/purgatory: Disable the stackleak GCC plugin for the purgatory 2019-10-11 18:21:18 +02:00
ras
realmode x86/realmode: Don't leak the trampoline kernel address 2019-05-04 09:20:21 +02:00
tools x86/insn: Fix awk regexp warnings 2019-12-01 09:17:37 +01:00
um um: Drop own definition of PTRACE_SYSEMU/_SINGLESTEP 2018-11-21 09:19:16 +01:00
video
xen kprobes/x86/xen: blacklist non-attachable xen interrupt functions 2019-12-05 09:20:25 +01:00
.gitignore
Kbuild
Kconfig x86/olpc: Fix build error with CONFIG_MFD_CS5535=m 2019-11-24 08:20:30 +01:00
Kconfig.cpu
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning 2019-09-19 09:09:41 +02:00
Makefile.um kbuild: rename LDFLAGS to KBUILD_LDFLAGS 2018-08-24 08:22:08 +09:00
Makefile_32.cpu