All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hongfu Li <hongfu.li@linux.dev>
To: Mike Rapoport <rppt@kernel.org>
Cc: hongfu.li@linux.dev, david@kernel.org, osalvador@suse.de,
	akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org,
	Hongfu Li <lihongfu@kylinos.cn>
Subject: Re: [PATCH] mm: add missing alloc_percpu() NULL check in hotplug init
Date: Fri, 17 Jul 2026 15:06:52 +0800	[thread overview]
Message-ID: <4d7ee6c9-ea5d-40d5-9af0-5c15b3c2cab0@linux.dev> (raw)
In-Reply-To: <alnPz-r76FU6t5Uc@kernel.org>


On 7/17/26 2:46 PM, Mike Rapoport wrote:
> On Fri, Jul 17, 2026 at 01:29:38PM +0800, Hongfu Li wrote:
>> From: Hongfu Li <lihongfu@kylinos.cn>
>>
>> No NULL check is done for alloc_percpu() when initializing per-CPU
>> nodestats. Allocation failure leads to NULL pointer dereference
>> during later memset.
>>
>> Make function return int, check alloc_percpu() result and return
>> -ENOMEM on error. The caller chain already propagates this error
>> correctly.
> I already applied a fix from Gregory:
>
> https://patch.msgid.link/20260701221613.2818148-1-gourry@gourry.net
>
> It'll be unstreamed soon.

Got it, I'll drop this patch as Gregory's fix is already on the way 
upstream.

      reply	other threads:[~2026-07-17  7:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17  5:29 [PATCH] mm: add missing alloc_percpu() NULL check in hotplug init Hongfu Li
2026-07-17  6:46 ` Mike Rapoport
2026-07-17  7:06   ` Hongfu Li [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=4d7ee6c9-ea5d-40d5-9af0-5c15b3c2cab0@linux.dev \
    --to=hongfu.li@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=lihongfu@kylinos.cn \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    --cc=rppt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.