diff options
| author | Tony Luck <tony.luck@intel.com> | 2025-12-17 09:20:48 -0800 |
|---|---|---|
| committer | Borislav Petkov (AMD) <bp@alien8.de> | 2026-01-04 07:30:10 +0100 |
| commit | 03eb578b37659e10bed14c2d9e7cc45dfe24123b (patch) | |
| tree | 5e2cf51f3e10bab4dbbea7122e28209c6f3f12e1 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git | |
| parent | f8f9c1f4d0c7a64600e2ca312dec824a0bc2f1da (diff) | |
x86,fs/resctrl: Improve domain type checking
Every resctrl resource has a list of domain structures. struct rdt_ctrl_domain
and struct rdt_mon_domain both begin with struct rdt_domain_hdr with
rdt_domain_hdr::type used in validity checks before accessing the domain of
a particular type.
Add the resource id to struct rdt_domain_hdr in preparation for a new monitoring
domain structure that will be associated with a new monitoring resource. Improve
existing domain validity checks with a new helper domain_header_is_valid()
that checks both domain type and resource id. domain_header_is_valid() should
be used before every call to container_of() that accesses a domain structure.
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lore.kernel.org/20251217172121.12030-1-tony.luck@intel.com
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
