summaryrefslogtreecommitdiffstats
path: root/include/linux/resctrl.h
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2022-09-02 15:48:12 +0000
committerBorislav Petkov <bp@suse.de>2022-09-22 15:27:15 +0200
commit7add3af4178d9e25afc8d990a7d1000ccb22b6a0 (patch)
treea7576b633b5869ec0cfa37dcd9b255355c4c8b49 /include/linux/resctrl.h
parent3a7232cdf19e39e7f24c493117b373788b348af2 (diff)
downloadlinux-stable-7add3af4178d9e25afc8d990a7d1000ccb22b6a0.tar.gz
linux-stable-7add3af4178d9e25afc8d990a7d1000ccb22b6a0.tar.bz2
linux-stable-7add3af4178d9e25afc8d990a7d1000ccb22b6a0.zip
x86/resctrl: Group struct rdt_hw_domain cleanup
domain_add_cpu() and domain_remove_cpu() need to kfree() the child arrays that were allocated by domain_setup_ctrlval(). As this memory is moved around, and new arrays are created, adjusting the error handling cleanup code becomes noisier. To simplify this, move all the kfree() calls into a domain_free() helper. This depends on struct rdt_hw_domain being kzalloc()d, allowing it to unconditionally kfree() all the child arrays. Signed-off-by: James Morse <james.morse@arm.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Jamie Iles <quic_jiles@quicinc.com> Reviewed-by: Shaopeng Tan <tan.shaopeng@fujitsu.com> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Tested-by: Xin Hao <xhao@linux.alibaba.com> Tested-by: Shaopeng Tan <tan.shaopeng@fujitsu.com> Tested-by: Cristian Marussi <cristian.marussi@arm.com> Link: https://lore.kernel.org/r/20220902154829.30399-5-james.morse@arm.com
Diffstat (limited to 'include/linux/resctrl.h')
0 files changed, 0 insertions, 0 deletions