From: Wang ShaoBo bobo.shaobowang@huawei.com
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4LMMF CVE: NA
-------------------------------------------------
This adds tips when rmid modification failed.
Fixes: a85aba6a1d67 ("mpam: Add support for group rmid modify") Signed-off-by: Wang ShaoBo bobo.shaobowang@huawei.com Reviewed-by: Cheng Jian cj.chengjian@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- arch/arm64/kernel/mpam/mpam_resctrl.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/arch/arm64/kernel/mpam/mpam_resctrl.c b/arch/arm64/kernel/mpam/mpam_resctrl.c index 79b711e2b7a5c..80f402476abbf 100644 --- a/arch/arm64/kernel/mpam/mpam_resctrl.c +++ b/arch/arm64/kernel/mpam/mpam_resctrl.c @@ -1890,12 +1890,14 @@ static ssize_t resctrl_group_rmid_write(struct kernfs_open_file *of,
if (rmid == 0 || rdtgrp->mon.rmid == 0) { ret = -EINVAL; + rdt_last_cmd_puts("default rmid 0 is always kept\n"); goto unlock; }
ret = rmid_to_partid_pmg(rmid, &partid, &pmg); if (ret < 0) { ret = -EINVAL; + rdt_last_cmd_puts("invalid rmid\n"); goto unlock; }
@@ -1904,6 +1906,7 @@ static ssize_t resctrl_group_rmid_write(struct kernfs_open_file *of,
if (rdtgrp->type != RDTCTRL_GROUP || !list_empty(&rdtgrp->mon.crdtgrp_list)) { + ret = -EINVAL; rdt_last_cmd_puts("unsupported operation\n"); goto unlock; }