Re: [PATCH v6 2/4] cacheinfo: Allocate memory during CPU hotplug if not done from the primary CPU

From: Ricardo Neri
Date: Fri Sep 13 2024 - 00:01:12 EST


On Thu, Sep 12, 2024 at 12:59:18PM +0200, Borislav Petkov wrote:
> On Wed, Sep 11, 2024 at 04:34:10PM -0700, Ricardo Neri wrote:
> > Yes, both patches address issues during CPU hotplug (both NULL-pointer
> > dereference). However, IHMO, they are separate issues. Patch 1/4 fixes
> > a missing allocation check. Patch 2/4 causes the allocation to happen in
> > case early allocation is not used.
> >
> > If I did not convince you, I am happy to merge together patches 1 and 2.
>
> Well, what is easier to handle by stable and/or backporters: one patch or two
> patches fixing two very similar CPU hotplug isuses in cacheinfo?

Indeed, one patch would be easier to handle.

>
> IOW, what is the benefit in having two patches instead of one?

Marginal I guess. I can put all the background and rationale in the commit
message.

I will post a new version merging patches 1 and 2... and fixing the
formatting of allocate_cache_info().