]> git.ipfire.org Git - thirdparty/linux.git/commit
padata: Put CPU offline callback in ONLINE section to allow failure
authorDaniel Jordan <daniel.m.jordan@oracle.com>
Fri, 13 Mar 2026 15:24:33 +0000 (11:24 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 22 Mar 2026 02:17:59 +0000 (11:17 +0900)
commitc8c4a2972f83c8b68ff03b43cecdb898939ff851
treecd12a5a42720f36159949a86a30ef5ed9595aa5e
parent7fc31dd86415fc04c71b8fd4743ad63183e8565f
padata: Put CPU offline callback in ONLINE section to allow failure

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@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/69af0a05.050a0220.310d8.002f.GAE@google.com/
Debugged-by: Thomas Gleixner <tglx@kernel.org>
Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
include/linux/cpuhotplug.h
include/linux/padata.h
kernel/padata.c