fs/resctrl: Report unknown schemata domains
PATCH 1/1 fs/resctrl: Report unknown schemata domains
A schemata write to an unknown domain returns -EINVAL without setting last_cmd_status. The status buffer is cleared before parsing, so reading last_cmd_status after the failed write incorrectly reports "ok".
Report the invalid domain before returning -EINVAL, matching the existing I/O allocation parser diagnostic.
--- fs/resctrl/ctrlmondata.c | 1 + 1 file changed, 1 insertion(+)
fs/resctrl/ctrlmondata.c +1 -0
@@ -279,6 +279,7 @@ static int parse_line(char *line, struct resctrl_schema *s, goto next; } } +rdt_last_cmd_printf ("Invalid domain %lu\n" , dom_id);return -EINVAL ; }
base-commit: 2a93af75384b7e95d62c5a9a39e13573e2170ec5
Signature · 1 line
2.43.0
Quoted 4 lines · Nirmoy Das
A schemata write to an unknown domain returns
-EINVALwithout settinglast_cmd_status. The status buffer is cleared before parsing, so readinglast_cmd_statusafter the failed write incorrectly reports "ok".
Quoted 9 lines
Report the invalid domain before returning
-EINVAL, matching the existing I/O allocation parser diagnostic.Fixes c377dcfbee80 ("x86/intel_rdt: Add diagnostics when writing the schemata file")Signed-off-by Nirmoy Das <[email protected]>--- fs/resctrl/ctrlmondata.c | 1 + 1 file changed, 1 insertion(+)
Thanks.
-Fenghua
Quoted 14 lines
fs/resctrl/ctrlmondata.c +1
-0@@ -279,6 +279,7 @@ static int parse_line(char *line, struct resctrl_schema *s, goto next; } } +rdt_last_cmd_printf ("Invalid domain %lu\n" , dom_id);return -EINVAL ; }base-commit:
2a93af75384b7e95d62c5a9a39e13573e2170ec5
Hi Nimroy,
Quoted 10 lines · Nirmoy Das
A schemata write to an unknown domain returns
-EINVALwithout settinglast_cmd_status. The status buffer is cleared before parsing, so readinglast_cmd_statusafter the failed write incorrectly reports "ok".Report the invalid domain before returning
-EINVAL, matching the existing I/O allocation parser diagnostic.Fixes c377dcfbee80 ("x86/intel_rdt: Add diagnostics when writing the schemata file")Signed-off-by Nirmoy Das <[email protected]>---
Thank you very much.
Reinette
Reinette Chatre
maintainerDear x86 maintainers,
Could you please consider including this fix?
Thank you very much.
Reinette
Quoted 27 lines · Nirmoy Das
A schemata write to an unknown domain returns
-EINVALwithout settinglast_cmd_status. The status buffer is cleared before parsing, so readinglast_cmd_statusafter the failed write incorrectly reports "ok".Report the invalid domain before returning
-EINVAL, matching the existing I/O allocation parser diagnostic.Fixes c377dcfbee80 ("x86/intel_rdt: Add diagnostics when writing the schemata file")Signed-off-by Nirmoy Das <[email protected]>--- fs/resctrl/ctrlmondata.c | 1 + 1 file changed, 1 insertion(+)fs/resctrl/ctrlmondata.c +1
-0@@ -279,6 +279,7 @@ static int parse_line(char *line, struct resctrl_schema *s, goto next; } } +rdt_last_cmd_printf ("Invalid domain %lu\n" , dom_id);return -EINVAL ; }base-commit:
2a93af75384b7e95d62c5a9a39e13573e2170ec5
The following commit has been merged into the x86/cache branch of tip:
The following commit has been merged into the x86/cache branch of tip:
Commit-ID: fa4058444973f352c94c3f4f2acdc0fd94335a0f Gitweb: https://git.kernel.org/tip/fa4058444973f352c94c3f4f2acdc0fd94335a0f Author: Nirmoy Das <[email protected]> AuthorDate: Wed, 18 Nov 2026 12:58:25 -08:00 Committer: Borislav Petkov (AMD) <[email protected]> CommitterDate: Tue, 24 Nov 2026 16:37:47 -08:00
fs/resctrl: Report unknown schemata domains
A schemata write to an unknown domain returns -EINVAL without setting last_cmd_status. The status buffer is cleared before parsing, so reading last_cmd_status after the failed write incorrectly reports "ok".
Report the invalid domain before returning -EINVAL, matching the existing I/O allocation parser diagnostic.
--- fs/resctrl/ctrlmondata.c | 1 + 1 file changed, 1 insertion(+)
fs/resctrl/ctrlmondata.c +1 -0
@@ -279,6 +279,7 @@ next: goto next; } } +rdt_last_cmd_printf ("Invalid domain %lu\n" , dom_id);return -EINVAL ; }