From: Zeng Heng <zengheng4@huawei.com> hulk inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/8421 -------------------------------- After repeatedly updating control group A's configuration, creating a monitoring subgroup under a different control group B inadvertently changes B's settings. The root cause is that every schemata writing operation sets ctrl_updated true via the parse_ctrlval() callback. When the identical configuration is written again, resctrl_group_update_domain_ctrls() would not resets ctrl_updated to false. As a result, while creating a monitoring group under any other control group, the configuration sync logic mis-detects a pending update and incorrectly propagates the stale values. Therefore, even no actual change is detected, resctrl_group_update_domain_ctrls() also needs restore ctrl_updated to false. Fixes: 3dc904091153 ("[Huawei] arm64/mpam_ctrlmon: Update ctrl group config with rdtgrp's partid") Signed-off-by: Zeng Heng <zengheng4@huawei.com> Signed-off-by: Quanmin Yan <yanquanmin1@huawei.com> --- arch/arm64/kernel/mpam/mpam_ctrlmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/mpam/mpam_ctrlmon.c b/arch/arm64/kernel/mpam/mpam_ctrlmon.c index d1a7b07114ab..ee057a14f115 100644 --- a/arch/arm64/kernel/mpam/mpam_ctrlmon.c +++ b/arch/arm64/kernel/mpam/mpam_ctrlmon.c @@ -269,9 +269,9 @@ static void resctrl_group_update_domain_ctrls(struct rdtgroup *rdtgrp, dom->ctrl_val[type][closid.intpartid] = cfg[i].new_ctrl[type]; dom->have_new_ctrl = true; - cfg[i].ctrl_updated[type] = false; update_on = true; } + cfg[i].ctrl_updated[type] = false; } if (update_on) resctrl_dom_ctrl_config(cdp_both_ctrl, r, dom, ¶); -- 2.43.0