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: 792e0f6f789b ("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

authored by James Morse and committed by Borislav Petkov d4ebfca2 64e87d4b

+2 -2
+2 -2
arch/x86/kernel/cpu/resctrl/core.c
··· 527 527 rdt_domain_reconfigure_cdp(r); 528 528 529 529 if (r->alloc_capable && domain_setup_ctrlval(r, d)) { 530 - kfree(d); 530 + kfree(hw_dom); 531 531 return; 532 532 } 533 533 534 534 if (r->mon_capable && domain_setup_mon_state(r, d)) { 535 535 kfree(hw_dom->ctrl_val); 536 536 kfree(hw_dom->mbps_val); 537 - kfree(d); 537 + kfree(hw_dom); 538 538 return; 539 539 } 540 540