linux/arch/x86/kernel/cpu/resctrl
James Morse e4f7171c23 x86/resctrl: Free the ctrlval arrays when domain_setup_mon_state() fails
commit 64e87d4bd3 upstream.

domain_add_cpu() is called whenever a CPU is brought online. The
earlier call to domain_setup_ctrlval() allocates the control value
arrays.

If domain_setup_mon_state() fails, the control value arrays are not
freed.

Add the missing kfree() calls.

Fixes: 1bd2a63b4f ("x86/intel_rdt/mba_sc: Add initialization support")
Fixes: edf6fa1c4a ("x86/intel_rdt/cqm: Add RMID (Resource monitoring ID) management")
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20210917165958.28313-1-james.morse@arm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-20 11:44:59 +02:00
..
core.c x86/resctrl: Free the ctrlval arrays when domain_setup_mon_state() fails 2021-10-20 11:44:59 +02:00
ctrlmondata.c x86/resctrl: Add struct rdt_cache::arch_has_{sparse, empty}_bitmaps 2020-08-19 10:41:40 +02:00
internal.h x86/resctrl: Fix AMD L3 QOS CDP enable/disable 2020-12-01 17:53:31 +01:00
Makefile x86/resctrl: Avoid confusion over the new X86_RESCTRL config 2019-02-02 10:34:52 +01:00
monitor.c x86/resctrl: Fix a maybe-uninitialized build warning treated as error 2021-09-15 09:50:47 +02:00
pseudo_lock_event.h
pseudo_lock.c mmap locking API: convert mmap_sem comments 2020-06-09 09:39:14 -07:00
rdtgroup.c x86/resctrl: Don't move a task to the same resource group 2021-01-12 20:18:23 +01:00