Re: [PATCH v2 2/5] fs/resctrl: Free mon_data structures on rdt_get_tree() failure

From: Chen, Yu C

Date: Sun May 17 2026 - 21:18:10 EST


On 5/16/2026 3:39 AM, Tony Luck wrote:
If mkdir_mondata_all() succeeds but a subsequent call in rdt_get_tree()
fails, the mon_data structures allocated by mon_get_kn_priv() are
leaked. Add mon_put_kn_priv() to the out_mondata error path to free
them.

Fixes: 2a6566038544 ("x86/resctrl: Expand the width of domid by replacing mon_data_bits")
Reported-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>

Reviewed-by: Chen Yu <yu.c.chen@xxxxxxxxx>

thanks,
Chenyu