From: Bin Lan <lanbincn@139.com>
To: gregkh@linuxfoundation.org, sashal@kernel.org, stable@vger.kernel.org
Cc: steffen.klassert@secunet.com, daniel.m.jordan@oracle.com,
linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au,
Bin Lan <lanbincn@139.com>
Subject: [PATCH 6.12.y 0/2] backport to fix a race condition/UAF in padata_reorder
Date: Sat, 25 Apr 2026 16:14:28 +0800 [thread overview]
Message-ID: <20260425081433.2763-1-lanbincn@139.com> (raw)
After applying these patches to v6.12.y, the padata.c file matches the upstream
version at commit 71203f68c774, with two exceptions:
1. cpumask_next_wrap API difference (line 310): The v6.12.y kernel still uses the
old 4-argument form cpumask_next_wrap(cpu, pd->cpumask.pcpu, -1, false),
whereas upstream uses the newer 2-argument form cpumask_next_wrap(cpu, pd->cpumask.pcpu).
These are functionally equivalent — upstream simply changed the API signature
in a separate commit (dc5bb9b769c9), which is too invasive to backport.
2. Divide-by-zero guard in padata_mt_helper (after line 496): The v6.12.y
doesn't include an extra check that forces chunk_size to at least 1 when
the caller sets min_chunk to 0. This prevents a divide-by-zero panic.
Thanks
Bin Lan
Herbert Xu (2):
padata: Fix pd UAF once and for all
padata: Remove comment for reorder_work
include/linux/padata.h | 4 --
kernel/padata.c | 136 +++++++++++------------------------------
2 files changed, 37 insertions(+), 103 deletions(-)
--
2.43.0
next reply other threads:[~2026-04-25 8:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-25 8:14 Bin Lan [this message]
2026-04-25 8:14 ` [PATCH 6.12.y 1/2] padata: Fix pd UAF once and for all Bin Lan
2026-04-25 8:14 ` [PATCH 6.12.y 2/2] padata: Remove comment for reorder_work Bin Lan
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=20260425081433.2763-1-lanbincn@139.com \
--to=lanbincn@139.com \
--cc=daniel.m.jordan@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=steffen.klassert@secunet.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