
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IC03L1 -------------------------------- When the tasks interface receives the iommu_group configuration and completes parsing the configuration, it should return and continue to parse next token, without entering the PID parsing process. Fixes: 150e3bb389bf ("fs/resctrl: Add support for assigning iommu_groups to resctrl groups") Signed-off-by: Zeng Heng <zengheng4@huawei.com> --- fs/resctrl/rdtgroup.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index 28a5a50c64f7..ff1ed540477a 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -826,9 +826,15 @@ static ssize_t rdtgroup_tasks_write(struct kernfs_open_file *of, pid_str = strim(strsep(&buf, ",")); is_iommu = string_is_iommu_group(pid_str, &iommu_group_id); - if (is_iommu) + if (is_iommu) { ret = rdtgroup_move_iommu(iommu_group_id, rdtgrp, of); - else if (kstrtoint(pid_str, 0, &pid)) { + if (ret) + break; + + continue; + } + + if (kstrtoint(pid_str, 0, &pid)) { rdt_last_cmd_printf("Task list parsing error pid %s\n", pid_str); ret = -EINVAL; break; -- 2.25.1