BUG: soft lockup in smc_release

Status: moderation: reported on 2026/12/03 23:18
Subsystems: kernel
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+fcc1d554c02923716c7f@syzkaller.appspotmail.com
First crash: 4d00h, last: 4d00h
✨ AI cause bisection: inconclusive (AI job)
✨ AI-generated root cause summary:

CPU 1 triggered a 33-second soft lockup immediately upon executing raw_local_irq_restore() at the end of lock_acquire() in kernel/locking/lockdep.c, called from write_lock_bh(&clcsk->sk_callback_lock) in smc_fback_restore_callbacks() (net/smc/af_smc.c). Inspection of the call path and lockdep irq-event timestamps (1916-1918) rules out any loop or lock deadlock in net/smc/af_smc.c: CPU 1 exited lock_sock_nested() with IRQs/BH enabled, ran linearly into smc_fback_restore_callbacks(), and had not yet attempted to acquire clcsk->sk_callback_lock. Because lock_acquire() disables hardirqs across __lock_acquire() via raw_local_irq_save()/raw_local_irq_restore(), CPU 1 could neither service the watchdog hrtimer nor respond to CPU 0's kick_all_cpus_sync() IPI (leaving CPU 0 waiting in csd_lock_wait()). The exact cause of the 33-second elapsed duration inside lock_acquire()β€”either extreme lockdep overhead under KASAN or a GCE arm64 hypervisor vCPU stall that kvm_check_and_clear_guest_paused() cannot detect on arm64β€”is inconclusive from the crash log alone.

▶ ▼ ✨ Full AI root cause analysis
Based on kernel commit 3fdeb5ad9354:

Technical Analysis

Crash Site and Execution State

On CPU 1, the soft lockup watchdog (watchdog_timer_fn() in kernel/watchdog.c) fired immediately after lock_acquire() (kernel/locking/lockdep.c:5946) executed raw_local_irq_restore(flags) (inlined __daif_local_irq_restore() in arch/arm64/include/asm/irqflags.h:175).

The call path on CPU 1 is:

  1. smc_release() (net/smc/af_smc.c:361) acquires the SMC socket lock via lock_sock_nested() / lock_sock() (net/core/sock.c:3929) and calls __smc_release().
  2. __smc_release() (net/smc/af_smc.c:310) takes the fallback branch (smc->use_fallback == true) and calls smc_restore_fallback_changes() -> smc_fback_restore_callbacks() (net/smc/af_smc.c:268).
  3. smc_fback_restore_callbacks() calls write_lock_bh(&clcsk->sk_callback_lock) (__raw_write_lock_bh() in include/linux/rwlock_api_smp.h:220-222):
    • __local_bh_disable_ip() disables softirqs (recorded at irq event stamp: 1918).
    • rwlock_acquire(&lock->dep_map, 0, 0, _RET_IP_) invokes lock_acquire(), before LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock) is reached.
  4. Inside lock_acquire() (kernel/locking/lockdep.c:5938-5946), raw_local_irq_save(flags) disables hardirqs, __lock_acquire() executes, and raw_local_irq_restore(flags) re-enables hardirqs (pstate shows daif unmasked). At that exact instruction, the pending softlockup hrtimer fires and reports BUG: soft lockup - CPU#1 stuck for 33s!.

Meanwhile, CPU 0 (bpf_int_jit_compile() -> bpf_jit_binary_pack_finalize() -> aarch64_insn_copy() -> __text_poke() -> flush_icache_range() -> kick_all_cpus_sync()) is spinning in csd_lock_wait() inside smp_call_function_many_cond() (kernel/smp.c:1028), waiting for CPU 1 to acknowledge the context-synchronization IPI that could not be delivered while CPU 1 had hardirqs disabled (or was stalled).

Hypotheses Ruled Out

  • Defect or loop in net/smc/af_smc.c:
    • The lockdep irq-event log shows softirqs last enabled at (1916) and hardirqs last enabled at (1917) at the end of lock_sock_nested(), followed immediately by softirqs last disabled at (1918) in smc_fback_restore_callbacks(). Between lock_sock_nested() (which calls might_sleep() and enables preemption/BH/IRQs on spin_unlock_bh(&sk->sk_lock.slock)) and smc_fback_restore_callbacks(), __smc_release() executes linearly with no loops, no locks (note kernel_sock_shutdown() was not entered as it would advance irq_events), and no preemption-disabling sections.
    • CPU 1 had not yet reached do_raw_write_lock() on clcsk->sk_callback_lock, so contention or deadlock on sk_callback_lock is ruled out.
    • CONFIG_KASAN=y is enabled, and kasan_check_byte(lock) at kernel/locking/lockdep.c:5916 passed with no UAF/OOB on clcsk.
  • Deadlock on lockdep's graph_lock (__lock):
    • There are only two CPUs (CPU 1's trigger_allbutcpu_cpu_backtrace() only sends NMI to CPU 0), and CPU 0 is in csd_lock_wait() (which does not hold lockdep_lock). Moreover, CPU 1 actually completed __lock_acquire() and lockdep_recursion_finish() before reaching raw_local_irq_restore().

Inconclusive Mechanism for the 33-Second Delay

Because CONFIG_PREEMPT=y is enabled and preempt_count and hardirqs were clear at stamp 1917 right before smc_fback_restore_callbacks(), the migration/1 stopper (softlockup_fn()) could not have been blocked from updating watchdog_touch_ts prior to lock_acquire(). The 33-second elapsed time therefore occurred between raw_local_irq_save(flags) and raw_local_irq_restore(flags) inside lock_acquire(), for which two explanations remain possible from the report alone:

  1. Hypervisor / host vCPU stall on GCE arm64: If the host preempted/paused vCPU 1 (or the VM) while CPU 1 was inside lock_acquire() with hardirqs disabled (and CPU 0 was spinning in kick_all_cpus_sync() waiting on CPU 1), running_clock() continues to advance on arm64 while paused. Unlike x86 KVM, kvm_check_and_clear_guest_paused() in watchdog_timer_fn() (kernel/watchdog.c:841) resolves to the include/asm-generic/kvm_para.h stub returning false on arm64, so host steal time is reported as a guest soft lockup as soon as raw_local_irq_restore() re-enables IRQs.
  2. Extreme latency inside __lock_acquire(): Lockdep graph validation (validate_chain(), check_noncircular(), check_redundant()) or save_trace() (arch_stack_walk()) running under CONFIG_KASAN=y and CONFIG_LOCKDEP=y with interrupts disabled, though graph traversal alone does not normally consume 33 seconds without host contention.
▶ ▼ ✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision
8d8f0448 bisect-cause IsRelease: ❌ ❓ BUG: soft lockup in smc_release 2026/11/29 23:50 2026/11/29 23:51 2026/11/30 00:27 e1f06033
b59c8072 assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ❌ FuzzingArtifact: ❌ MemoryCorruption: ❌ NetworkNeedsSetup: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: βœ… UserNamespace: βœ… VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ BUG: soft lockup in smc_release 2026/11/29 23:04 2026/11/29 23:04 2026/11/29 23:13 e1f06033

Sample crash report:
watchdog: BUG: soft lockup - CPU#1 stuck for 33s! [syz.7.869:9099]
Modules linked in:
irq event stamp: 1918
hardirqs last  enabled at (1917): [<ffff800080324a60>] __local_bh_enable_ip+0x14c/0x234 kernel/softirq.c:478
hardirqs last disabled at (1915): [<ffff8000803249e0>] __local_bh_enable_ip+0xcc/0x234 kernel/softirq.c:455
softirqs last  enabled at (1916): [<ffff800084ca4054>] spin_unlock_bh include/linux/spinlock.h:407 [inline]
softirqs last  enabled at (1916): [<ffff800084ca4054>] lock_sock_nested+0xb0/0x110 net/core/sock.c:3929
softirqs last disabled at (1918): [<ffff80008651a680>] smc_fback_restore_callbacks net/smc/af_smc.c:268 [inline]
softirqs last disabled at (1918): [<ffff80008651a680>] smc_restore_fallback_changes net/smc/af_smc.c:284 [inline]
softirqs last disabled at (1918): [<ffff80008651a680>] __smc_release+0x2dc/0x698 net/smc/af_smc.c:310
CPU: 1 UID: 0 PID: 9099 Comm: syz.7.869 Tainted: G             L      syzkaller #0 PREEMPT 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
pstate: 63400005 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
pc : lock_acquire+0x168/0x320 arch/arm64/include/asm/irqflags.h:-1
lr : lockdep_recursion_finish kernel/locking/lockdep.c:470 [inline]
lr : lock_acquire+0x148/0x320 kernel/locking/lockdep.c:5945
sp : ffff800093367a00
x29: ffff800093367a50 x28: 0000000000000000 x27: ffff0000d4958000
x26: ffff8000898842f8 x25: 0000000000000000 x24: 0000000000000001
x23: 0000000000000000 x22: ffff0000c6874648 x21: ffff80008651a680
x20: 0000000000000000 x19: 0000000000000000 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
x14: 00000000000906e5 x13: 0000000000000001 x12: 0000000000000003
x11: 0000000000000000 x10: 0000000000000003 x9 : 0000000000000000
x8 : 00000000000000c0 x7 : 0000000000000000 x6 : ffff8000804a26c8
x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff8000804b2588
x2 : 0000000100000201 x1 : ffff0000d4958000 x0 : 0000000000000001
dump_backtrace(regs = 00000000b0bd8d29 tsk = 0000000000000000)
Call trace:
 __daif_local_irq_restore arch/arm64/include/asm/irqflags.h:175 [inline] (P)
 arch_local_irq_restore arch/arm64/include/asm/irqflags.h:195 [inline] (P)
 lock_acquire+0x168/0x320 kernel/locking/lockdep.c:5946 (P)
 __raw_write_lock_bh include/linux/rwlock_api_smp.h:221 [inline]
 _raw_write_lock_bh+0x48/0x60 kernel/locking/spinlock.c:369
 smc_fback_restore_callbacks net/smc/af_smc.c:268 [inline]
 smc_restore_fallback_changes net/smc/af_smc.c:284 [inline]
 __smc_release+0x2dc/0x698 net/smc/af_smc.c:310
 smc_release+0x248/0x51c net/smc/af_smc.c:361
 __sock_release+0xa0/0x1d4 net/socket.c:735
 sock_close+0x24/0x38 net/socket.c:1529
 __fput+0x338/0x74c fs/file_table.c:512
 fput_close_sync+0x10c/0x278 fs/file_table.c:618
 filp_close_sync+0x7c/0xb4 fs/open.c:1574
 __do_sys_close fs/open.c:1597 [inline]
 __se_sys_close fs/open.c:1584 [inline]
 __arm64_sys_close+0x74/0x108 fs/open.c:1584
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0xec/0x23c arch/arm64/kernel/syscall.c:121
 do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140
 el0_svc+0x60/0x1d8 arch/arm64/kernel/entry-common.c:797
 el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:816
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:606
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 9108 Comm: syz.6.871 Tainted: G             L      syzkaller #0 PREEMPT 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
pc : csd_lock_wait kernel/smp.c:389 [inline]
pc : smp_call_function_many_cond+0x1104/0x14e0 kernel/smp.c:1028
lr : csd_lock_wait kernel/smp.c:389 [inline]
lr : smp_call_function_many_cond+0x111c/0x14e0 kernel/smp.c:1028
sp : ffff800095167220
x29: ffff800095167360 x28: dfff800000000000 x27: 0000000000000001
x26: 0000000000000001 x25: 0000000000000011 x24: 0000000000000001
x23: ffffffffffffffff x22: 1fffe000359cb530 x21: ffff0001ace85068
x20: ffff00010abd6db8 x19: ffff0001ace5a980 x18: ffff80009456d074
x17: ffff80009456d072 x16: ffff80009456d071 x15: 0000000000000001
x14: 00000000ffff8000 x13: 0000000000000001 x12: 0000000000000000
x11: 0000000000000000 x10: ffff6000359d0a0e x9 : 0000000000000000
x8 : 0000000000000011 x7 : 0000000000000000 x6 : ffff800080169554
x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff8000805c0f30
x2 : 0000000000000000 x1 : ffff00010abd5880 x0 : 0000000000000000
dump_backtrace(regs = 000000006d6ecb1d tsk = 0000000000000000)
Call trace:
 __cmpwait_case_32 arch/arm64/include/asm/cmpxchg.h:233 [inline] (P)
 __cmpwait arch/arm64/include/asm/cmpxchg.h:259 [inline] (P)
 csd_lock_wait kernel/smp.c:389 [inline] (P)
 smp_call_function_many_cond+0x1104/0x14e0 kernel/smp.c:1028 (P)
 smp_call_function kernel/smp.c:1069 [inline]
 kick_all_cpus_sync+0x34/0x40 kernel/smp.c:1218
 flush_icache_range arch/arm64/include/asm/cacheflush.h:105 [inline]
 __text_poke+0xd8/0xf8 arch/arm64/kernel/patching.c:129
 aarch64_insn_copy+0x3c/0x50 arch/arm64/kernel/patching.c:160
 bpf_arch_text_copy+0x34/0x54 arch/arm64/net/bpf_jit_comp.c:2572
 bpf_jit_binary_pack_finalize+0x44/0xf0 kernel/bpf/core.c:1251
 bpf_int_jit_compile+0xd88/0x11d8 arch/arm64/net/bpf_jit_comp.c:2477
 bpf_prog_jit_compile kernel/bpf/core.c:2705 [inline]
 __bpf_prog_select_runtime+0x3b0/0x6dc kernel/bpf/core.c:2760
 bpf_prog_select_runtime+0x2c/0x3c kernel/bpf/core.c:2805
 bpf_migrate_filter net/core/filter.c:1322 [inline]
 bpf_prepare_filter+0xc80/0xdb8 net/core/filter.c:1370
 __get_filter+0x1b4/0x224 net/core/filter.c:1539
 sk_reuseport_attach_filter+0x2c/0x144 net/core/filter.c:1572
 sk_setsockopt+0x1a40/0x26fc net/core/sock.c:1497
 udp_lib_setsockopt+0xd0/0x79c net/ipv4/udp.c:2945
 udp_setsockopt+0x84/0xc0 net/ipv4/udp.c:3041
 sock_common_setsockopt+0xb0/0xcc net/core/sock.c:4117
 do_sock_setsockopt+0x1f0/0x330 net/socket.c:2399
 __sys_setsockopt+0x104/0x170 net/socket.c:2424
 __do_sys_setsockopt net/socket.c:2430 [inline]
 __se_sys_setsockopt net/socket.c:2427 [inline]
 __arm64_sys_setsockopt+0xc8/0xe4 net/socket.c:2427
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x244 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0xec/0x23c arch/arm64/kernel/syscall.c:121
 do_el0_svc+0x4c/0x5c arch/arm64/kernel/syscall.c:140
 el0_svc+0x60/0x1d8 arch/arm64/kernel/entry-common.c:797
 el0t_64_sync_handler+0x44/0x104 arch/arm64/kernel/entry-common.c:816
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:606

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/29 23:03 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 3fdeb5ad9354 e1f06033 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: soft lockup in smc_release
* Struck through repros no longer work on HEAD.