mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Badole, Vishal" <vishal.badole@amd.com>
To: "Guo, Wangyang" <wangyang.guo@intel.com>,
	"tglx@kernel.org" <tglx@kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "bp@alien8.de" <bp@alien8.de>,
	"Li, Tianyou" <tianyou.li@intel.com>,
	"tim.c.chen@linux.intel.com" <tim.c.chen@linux.intel.com>,
	"Liang, Dan" <dan.liang@intel.com>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH v3] lib/group_cpus: Snapshot cluster masks to keep grouping hotplug invariant
Date: Tue, 25 Aug 2026 18:47:40 +0530	[thread overview]
Message-ID: <0524f7d8-970d-4a2a-aa6f-c0cb9d479deb@amd.com> (raw)
In-Reply-To: <DS0PR11MB80186E471C1553ADAB16FEA592AF2@DS0PR11MB8018.namprd11.prod.outlook.com>



On 8/25/2026 12:14 PM, Guo, Wangyang wrote:
> +	for_each_possible_cpu(cpu) {
> +		if (!zalloc_cpumask_var(&snapshot[cpu], GFP_KERNEL)) {
> +			while (cpu--)
> for_each_possible_cpu(cpu) may have holes, but "while (cpu--)" assume the enumeration is dense.
> Although freeing NULL is not a bug, it worths a comment or check for such subtle thing.
> +				free_cpumask_var(snapshot[cpu]);
> +			kfree(snapshot);
> +			goto out;
> +		}
> +	}

Thanks for the review. Sure, I will address this in the next revision.

      reply	other threads:[~2026-08-25 13:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 18:49 Vishal Badole
2026-08-25  6:44 ` Guo, Wangyang
2026-08-25 13:17   ` Badole, Vishal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0524f7d8-970d-4a2a-aa6f-c0cb9d479deb@amd.com \
    --to=vishal.badole@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=dan.liang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@kernel.org \
    --cc=tianyou.li@intel.com \
    --cc=tim.c.chen@linux.intel.com \
    --cc=wangyang.guo@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®