diff options
author | Waiman Long <longman@redhat.com> | 2025-09-02 14:15:37 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2025-09-03 08:40:11 -1000 |
commit | e117ff1129daa7d63536833f39285e50ad52379d (patch) | |
tree | aba1ed73a254aecce00a04ae90d3b4835f4709c6 /rust/helpers/helpers.c | |
parent | 3b0dec689a6301845761681b852f9538cb75a1d2 (diff) |
cgroup/cpuset: Prevent NULL pointer access in free_tmpmasks()
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>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions