]> git.baikalelectronics.ru Git - kernel.git/commit
x86/resctrl: Fix kfree() of the wrong type in domain_add_cpu()
authorJames Morse <james.morse@arm.com>
Fri, 17 Sep 2021 16:59:24 +0000 (16:59 +0000)
committerBorislav Petkov <bp@suse.de>
Wed, 6 Oct 2021 16:45:27 +0000 (18:45 +0200)
commit88172ad9a1638e023c06b55c276e43e2a40ddc8c
treedad78126d785de3752998164f09543443df3aba8
parentd213be1bb9ed331ee1f8f87d290ca5e4a05da171
x86/resctrl: Fix kfree() of the wrong type in domain_add_cpu()

Commit in Fixes separated the architecture specific and filesystem parts
of the resctrl domain structures.

This left the error paths in domain_add_cpu() kfree()ing the memory with
the wrong type.

This will cause a problem if someone adds a new member to struct
rdt_hw_domain meaning d_resctrl is no longer the first member.

Fixes: e4768d23c57b ("x86/resctrl: Split struct rdt_domain")
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>
Link: https://lkml.kernel.org/r/20210917165924.28254-1-james.morse@arm.com
arch/x86/kernel/cpu/resctrl/core.c