Re: [PATCH v2] padata: Put CPU offline callback in ONLINE section to allow failure
From: Herbert Xu
Date: Sat Mar 21 2026 - 04:51:54 EST
Daniel Jordan <daniel.m.jordan@xxxxxxxxxx> wrote:
> syzbot reported the following warning:
>
> DEAD callback error for CPU1
> WARNING: kernel/cpu.c:1463 at _cpu_down+0x759/0x1020 kernel/cpu.c:1463, CPU#0: syz.0.1960/14614
>
> at commit 4ae12d8bd9a8 ("Merge tag 'kbuild-fixes-7.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux")
> which tglx traced to padata_cpu_dead() given it's the only
> sub-CPUHP_TEARDOWN_CPU callback that returns an error.
>
> Failure isn't allowed in hotplug states before CPUHP_TEARDOWN_CPU
> so move the CPU offline callback to the ONLINE section where failure is
> possible.
>
> Fixes: 894c9ef9780c ("padata: validate cpumask without removed CPU during offline")
> Reported-by: syzbot+123e1b70473ce213f3af@xxxxxxxxxxxxxxxxxxxxxxxxx
> Closes: https://lore.kernel.org/all/69af0a05.050a0220.310d8.002f.GAE@xxxxxxxxxx/
> Debugged-by: Thomas Gleixner <tglx@xxxxxxxxxx>
> Signed-off-by: Daniel Jordan <daniel.m.jordan@xxxxxxxxxx>
> ---
>
> v2
> - Use non-atomic __cpumask_clear_cpu
>
> Applies to cryptodev-2.6 but not mainline since it requires
> https://lore.kernel.org/all/20260226080703.3157990-1-zhouchuyi@xxxxxxxxxxxxx/
>
> include/linux/cpuhotplug.h | 1 -
> include/linux/padata.h | 8 +--
> kernel/padata.c | 120 +++++++++++++++++++------------------
> 3 files changed, 65 insertions(+), 64 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt