Re: [PATCH v6 00/30] x86,fs/resctrl telemetry monitoring

From: Luck, Tony
Date: Fri Jun 27 2025 - 14:09:17 EST


On Thu, Jun 26, 2025 at 05:26:46PM -0700, Luck, Tony wrote:
> Bother. Just got e-mail after posting v6 from lkp. Apparently
> I applied the fixes to avoid "'d' used before set" in
> domain_remove_cpu_ctrl() and domain_remove_cpu_mon() to some
> other branch than the one that made it to my final version.
>
> Please imagine the hunks below merged into patches 7 & 8.

I merged these changes back into the series and pushed the updated
version to git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git
branch rdt-aet-v6.
>
> -Tony
>
> ---
>
> diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
> index 3ec8fbd2f778..39cee572a121 100644
> --- a/arch/x86/kernel/cpu/resctrl/core.c
> +++ b/arch/x86/kernel/cpu/resctrl/core.c
> @@ -651,8 +651,8 @@ static void domain_remove_cpu_ctrl(int cpu, struct rdt_resource *r)
> if (!domain_header_is_valid(hdr, RESCTRL_CTRL_DOMAIN, r->rid))
> return;
>
> - cpumask_clear_cpu(cpu, &d->hdr.cpu_mask);
> - if (!cpumask_empty(&d->hdr.cpu_mask))
> + cpumask_clear_cpu(cpu, &hdr->cpu_mask);
> + if (!cpumask_empty(&hdr->cpu_mask))
> return;
>
> d = container_of(hdr, struct rdt_ctrl_domain, hdr);
> @@ -696,8 +696,8 @@ static void domain_remove_cpu_mon(int cpu, struct rdt_resource *r)
> if (!domain_header_is_valid(hdr, RESCTRL_MON_DOMAIN, r->rid))
> return;
>
> - cpumask_clear_cpu(cpu, &d->hdr.cpu_mask);
> - if (!cpumask_empty(&d->hdr.cpu_mask))
> + cpumask_clear_cpu(cpu, &hdr->cpu_mask);
> + if (!cpumask_empty(&hdr->cpu_mask))
> return;
>
> switch (r->rid) {