提交 f654d1f3 编写于 作者: X Xie XiuQi

arm64/mpam: update group flags only when enable sucsses

hulk inclusion
category: bugfix
bugzilla: 14212
CVE: NA

The ctrlcon flag should be set only when we sucessful to
enable ctrlmon, or the flag is mismatch with ctrlmon status.

ctrlmon is indicate a group which could moniter the usage
of L3/Memory bandwidth.
Signed-off-by: NXie XiuQi <xiexiuqi@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 940daa14
......@@ -1013,9 +1013,10 @@ static ssize_t resctrl_group_ctrlmon_write(struct kernfs_open_file *of,
rdtgrp->flags &= ~RDT_CTRLMON;
resctrl_ctrlmon_disable(rdtgrp->mon.mon_data_kn, rdtgrp);
} else if (!(rdtgrp->flags & RDT_CTRLMON) && ctrlmon) {
rdtgrp->flags |= RDT_CTRLMON;
resctrl_ctrlmon_enable(rdtgrp->kn, rdtgrp,
&rdtgrp->mon.mon_data_kn);
ret = resctrl_ctrlmon_enable(rdtgrp->kn, rdtgrp,
&rdtgrp->mon.mon_data_kn);
if (!ret)
rdtgrp->flags |= RDT_CTRLMON;
} else {
ret = -ENOENT;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册