[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aLiLsQsM2oxk8Cko@slm.duckdns.org>
Date: Wed, 3 Sep 2025 08:40:49 -1000
From: Tejun Heo <tj@...nel.org>
To: Waiman Long <longman@...hat.com>
Cc: Johannes Weiner <hannes@...xchg.org>,
Michal Koutný <mkoutny@...e.com>,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
Ashay Jaiswal <quic_ashayj@...cinc.com>,
Chen Ridong <chenridong@...wei.com>
Subject: Re: [PATCH] cgroup/cpuset: Prevent NULL pointer access in
free_tmpmasks()
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@...cinc.com>
> Closes: https://lore.kernel.org/lkml/20250902-cpuset-free-on-condition-v1-1-f46ffab53eac@quicinc.com/
> Signed-off-by: Waiman Long <longman@...hat.com>
Applied to cgroup/for-6.18.
Thanks.
--
tejun
Powered by blists - more mailing lists