diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-07-05 05:37:46 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-07-05 05:37:46 -1000 |
| commit | f105f3631d51e8d7c49bf18ec21b873e4f38e648 (patch) | |
| tree | 3eb3ab98204b4fdccae2630e14aca2ebef99e3e4 /arch | |
| parent | c10dc5c03e17a9502325f3f49721a6058d162048 (diff) | |
| parent | fc16126cc11d9f507130bf84ab137ee0938c900e (diff) | |
| download | linux-2.6-f105f3631d51e8d7c49bf18ec21b873e4f38e648.tar.gz linux-2.6-f105f3631d51e8d7c49bf18ec21b873e4f38e648.zip | |
Merge tag 'x86-urgent-2026-07-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Ingo Molnar:
- Prevent OOB access in the resctrl code while offlining
CPUs when Intel SNC (Sub-NUMA Clustering) is enabled
(Reinette Chatre)
* tag 'x86-urgent-2026-07-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86,fs/resctrl: Prevent out-of-bounds access while offlining CPU when SNC enabled
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/x86/kernel/cpu/resctrl/monitor.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/resctrl/monitor.c index 03ee6102ab07..569894d6e5c8 100644 --- a/arch/x86/kernel/cpu/resctrl/monitor.c +++ b/arch/x86/kernel/cpu/resctrl/monitor.c @@ -259,6 +259,11 @@ int resctrl_arch_rmid_read(struct rdt_resource *r, struct rdt_domain_hdr *hdr, if (!domain_header_is_valid(hdr, RESCTRL_MON_DOMAIN, RDT_RESOURCE_L3)) return -EINVAL; + if (cpumask_empty(&hdr->cpu_mask)) { + pr_warn_once("Domain %d has no CPUs\n", hdr->id); + return -EINVAL; + } + d = container_of(hdr, struct rdt_l3_mon_domain, hdr); hw_dom = resctrl_to_arch_mon_dom(d); cpu = cpumask_any(&hdr->cpu_mask); |
