[tip: x86/cache] fs/resctrl: Report unknown schemata domains

From: tip-bot2 for Nirmoy Das

Date: Tue Nov 24 2026 - 21:04:38 EST


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 <nirmoyd@xxxxxxxxxx>
AuthorDate: Wed, 18 Nov 2026 12:58:25 -08:00
Committer: Borislav Petkov (AMD) <bp@xxxxxxxxx>
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.

Fixes: c377dcfbee80 ("x86/intel_rdt: Add diagnostics when writing the schemata file")
Signed-off-by: Nirmoy Das <nirmoyd@xxxxxxxxxx>
Signed-off-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>
Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
Reviewed-by: Fenghua Yu <fenghuay@xxxxxxxxxx>
Link: https://patch.msgid.link/20261118205825.3339003-1-nirmoyd@xxxxxxxxxx
---
fs/resctrl/ctrlmondata.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/fs/resctrl/ctrlmondata.c b/fs/resctrl/ctrlmondata.c
index 556032e..a37b245 100644
--- a/fs/resctrl/ctrlmondata.c
+++ b/fs/resctrl/ctrlmondata.c
@@ -279,6 +279,7 @@ next:
goto next;
}
}
+ rdt_last_cmd_printf("Invalid domain %lu\n", dom_id);
return -EINVAL;
}