From: Tejun Heo <tj@kernel.org>
To: Waiman Long <longman@redhat.com>
Cc: "Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
"Ashay Jaiswal" <quic_ashayj@quicinc.com>,
"Chen Ridong" <chenridong@huawei.com>
Subject: Re: [PATCH] cgroup/cpuset: Prevent NULL pointer access in free_tmpmasks()
Date: Wed, 3 Sep 2025 08:40:49 -1000 [thread overview]
Message-ID: <aLiLsQsM2oxk8Cko@slm.duckdns.org> (raw)
In-Reply-To: <20250902181537.833102-1-longman@redhat.com>
On Tue, Sep 02, 2025 at 02:15:37PM -0400, Waiman Long wrote:
> Commit 5806b3d05165 ("cpuset: decouple tmpmasks and cpumasks freeing in
> cgroup") separates out the freeing of tmpmasks into a new free_tmpmask()
> helper but removes the NULL pointer check in the process. Unfortunately a
> NULL pointer can be passed to free_tmpmasks() in cpuset_handle_hotplug()
> if cpuset v1 is active. This can cause segmentation fault and crash
> the kernel.
>
> Fix that by adding the NULL pointer check to free_tmpmasks().
>
> Fixes: 5806b3d05165 ("cpuset: decouple tmpmasks and cpumasks freeing in cgroup")
> Reported-by: Ashay Jaiswal <quic_ashayj@quicinc.com>
> Closes: https://lore.kernel.org/lkml/20250902-cpuset-free-on-condition-v1-1-f46ffab53eac@quicinc.com/
> Signed-off-by: Waiman Long <longman@redhat.com>
Applied to cgroup/for-6.18.
Thanks.
--
tejun
prev parent reply other threads:[~2025-09-03 18:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-02 18:15 Waiman Long
2025-09-03 0:39 ` Chen Ridong
2025-09-03 18:40 ` Tejun Heo [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=aLiLsQsM2oxk8Cko@slm.duckdns.org \
--to=tj@kernel.org \
--cc=cgroups@vger.kernel.org \
--cc=chenridong@huawei.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mkoutny@suse.com \
--cc=quic_ashayj@quicinc.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®