BUG: soft lockup in sys_setxattr

Status: moderation: reported on 2026/11/28 11:22
Subsystems: arch kvm
Labels: prio:low
[Documentation on labels]
Reported-by: syzbot+10c4ee12cbad9a019bd4@syzkaller.appspotmail.com
First crash: 1h14m, last: 1h14m
✨ AI-generated root cause summary:

The reported soft lockup on CPU 1 is a false positive caused by host hypervisor vCPU preemption/starvation on GCE ARM64 rather than a hang or infinite loop in overlayfs, ext4, or quota code. CPU 1 masked IRQs via raw_local_irq_save() inside lockdep's lock_acquire() during __dquot_alloc_space(), was stalled by the host hypervisor for ~31 seconds, and immediately took the pending watchdog_timer_fn() interrupt upon restoring DAIF at lock_acquire+0x168. Because arm64 uses the include/asm-generic/kvm_para.h stub for kvm_check_and_clear_guest_paused() (always returning false), watchdog_timer_fn() failed to discount the hypervisor-paused interval and reported a soft lockup, while CPU 0's KFENCE worker (toggle_allocation_gate()) was concurrently waiting in csd_lock_wait() for CPU 1 to handle its kick_all_cpus_sync() IPI.

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

Technical Root Cause Analysis

The reported soft lockup (BUG: soft lockup - CPU#1 stuck for 31s! [syz.4.1340:9930]) is a false positive caused by host hypervisor vCPU preemption/starvation on GCE ARM64, combined with ARM64 lacking a kvm_check_and_clear_guest_paused() implementation. There is no deadlock, spinlock contention, or non-preemptible loop in overlayfs, splice, ext4, dquot, or kfence.

1. Why the filesystem/quota call chain on CPU 1 is not stuck

  • Preemption is enabled and intact: The kernel is built with CONFIG_PREEMPT=y and CONFIG_DEBUG_ATOMIC_SLEEP=y, and the task has no prior warning taint (Tainted: G L).
  • Preemptible copy-up and allocation path: ovl_copy_up_file() (fs/overlayfs/copy_up.c) splices in 1 MB chunks (OVL_COPY_UP_CHUNK_SIZE) via do_splice_direct() -> iter_file_splice_write() (fs/splice.c) -> ext4_buffered_write_iter() -> generic_perform_write() (mm/filemap.c). generic_perform_write() calls cond_resched() on every folio (mm/filemap.c:4435), and ext4_mb_new_blocks() calls might_sleep() (fs/ext4/mballoc.c:6240), confirming preempt_count() == 0 upon entry.
  • Single-block allocation request: ext4_block_write_begin() (fs/ext4/inode.c:1329-1332) invokes _ext4_get_block() with bh->b_size == blocksize, so map.m_len == 1 and ar.len == 1 in ext4_mb_new_blocks(), ruling out a long dquot_alloc_block() loop at fs/ext4/mballoc.c:6274-6280.
  • Not spinning on inode->i_lock: In __dquot_alloc_space() (fs/quota/dquot.c:1678), spin_lock(&inode->i_lock) was still inside lock_acquire() (kernel/locking/lockdep.c:5946) before do_raw_spin_lock() was reached.
  • Not 31 seconds of active CPU execution: irq event stamp: 483 indicates current->irqtrace.irq_events recorded fewer than ~240 IRQ disable/enable transitions in totalβ€”far too few for 31 seconds of active HZ timer ticks or continuous folio allocations. Furthermore, with CONFIG_PREEMPT=y, migration/1 runs in stop_sched_class and would immediately preempt syz.4.1340 to run softlockup_fn() on earlier watchdog ticks if CPU 1 were actively executing preemptible code.

2. Mechanism of the false-positive soft lockup and CPU 0's IPI wait

  1. IRQ masking during lock_acquire(): On CPU 1, lock_acquire() (kernel/locking/lockdep.c:5938-5946) masked hardware interrupts via raw_local_irq_save(flags) while running __lock_acquire().
  2. Hypervisor vCPU stall: While CPU 1 had PSTATE.I masked inside lock_acquire(), the GCE host hypervisor preempted/stalled vCPU 1 for ~31 seconds, during which the ARM64 architectural counter (cntvct_el0) continued advancing.
  3. Concurrent KFENCE IPI on CPU 0: Every kfence_sample_interval, CPU 0 executes toggle_allocation_gate() (mm/kfence/core.c:894-909), calling static_branch_disable(&kfence_allocation_key) -> arch_jump_label_transform_apply() (arch/arm64/kernel/jump_label.c:34) -> kick_all_cpus_sync() -> smp_call_function_many_cond(). Because vCPU 1 was stalled (and then in watchdog_timer_fn() with IRQs disabled), CPU 0 waited in csd_lock_wait() (kernel/smp.c:389) for CPU 1 to acknowledge the IPI, where the NMI backtrace caught it.
  4. Immediate watchdog trigger without guest-pause accounting: As soon as vCPU 1 resumed and restored DAIF in __daif_local_irq_restore() (arch/arm64/include/asm/irqflags.h:175, at lock_acquire+0x168), the pending arch timer interrupt fired watchdog_timer_fn() (kernel/watchdog.c:798). At kernel/watchdog.c:841, watchdog_timer_fn() calls kvm_check_and_clear_guest_paused() specifically to avoid false soft lockups after host-induced pauses, but on arm64 this resolves to the stub in include/asm-generic/kvm_para.h:12-15 that unconditionally returns false. Consequently, is_softlockup() (kernel/watchdog.c:868) sees the ~31s wall-clock jump exceeding get_softlockup_thresh() and immediately reports BUG: soft lockup before returning from the interrupt to let migration/1 execute softlockup_fn().
▶ ▼ ✨ AI Jobs (2)
ID Workflow Result Correct Bug Created Started Finished Revision
2ce6f2ce bisect-cause πŸƒ BUG: soft lockup in sys_setxattr 2026/11/28 10:47 2026/11/28 10:47 e1f06033
a8ba4395 assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ❌ FuzzingArtifact: ❌ MemoryCorruption: ❌ NetworkNeedsSetup: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ BUG: soft lockup in sys_setxattr 2026/11/28 10:36 2026/11/28 10:37 2026/11/28 11:21 e1f06033
▶ ▼ Similar bugs (1)
Kernel Title Rank πŸ›ˆ Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in sys_setxattr (2) fs 1 syz, C done 3 1684d 1683d 22/30 fixed on 2023/02/24 13:50

Sample crash report:
watchdog: BUG: soft lockup - CPU#1 stuck for 31s! [syz.4.1340:9930]
Modules linked in:
irq event stamp: 483
hardirqs last  enabled at (483): [<ffff8000869a51b8>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:210 [inline]
hardirqs last  enabled at (483): [<ffff8000869a51b8>] _raw_spin_unlock_irqrestore+0x38/0x98 kernel/locking/spinlock.c:221
hardirqs last disabled at (482): [<ffff8000869a4dfc>] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:153 [inline]
hardirqs last disabled at (482): [<ffff8000869a4dfc>] _raw_spin_lock_irqsave+0x2c/0x7c kernel/locking/spinlock.c:181
softirqs last  enabled at (356): [<ffff8000800204f4>] __do_softirq+0x14/0x20 kernel/softirq.c:703
softirqs last disabled at (331): [<ffff8000800204f4>] __do_softirq+0x14/0x20 kernel/softirq.c:703
CPU: 1 UID: 0 PID: 9930 Comm: syz.4.1340 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 : ffff800097895a30
x29: ffff800097895a80 x28: 0000000000000000 x27: ffff0000c5331d80
x26: ffff8000898842f8 x25: 0000000000000000 x24: 0000000000000001
x23: 0000000000000000 x22: ffff00012931dd78 x21: ffff800080f14e58
x20: 0000000000000000 x19: 0000000000000000 x18: 00000000ffffffff
x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
x14: 00000000001fad1a x13: 0000000000000001 x12: 0000000000000003
x11: 0000000000000000 x10: 0000000000000003 x9 : 0000000000000000
x8 : 00000000000000c0 x7 : 0000000000000000 x6 : ffff8000804a26c8
x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff8000804b2588
x2 : 0000000100000001 x1 : ffff0000c5331d80 x0 : 0000000000000001
dump_backtrace(regs = 000000005446258a 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_spin_lock include/linux/spinlock_api_smp.h:190 [inline]
 _raw_spin_lock+0x48/0x60 kernel/locking/spinlock.c:173
 spin_lock include/linux/spinlock.h:347 [inline]
 __dquot_alloc_space+0x184/0x984 fs/quota/dquot.c:1678
 dquot_alloc_space_nodirty include/linux/quotaops.h:297 [inline]
 dquot_alloc_space include/linux/quotaops.h:310 [inline]
 dquot_alloc_block include/linux/quotaops.h:334 [inline]
 ext4_mb_new_blocks+0xc68/0x3b60 fs/ext4/mballoc.c:6275
 ext4_ext_map_blocks+0xfc4/0x3ffc fs/ext4/extents.c:4469
 ext4_map_create_blocks+0x100/0x4a0 fs/ext4/inode.c:692
 ext4_map_blocks+0x860/0xff8 fs/ext4/inode.c:937
 _ext4_get_block+0x1b8/0x46c fs/ext4/inode.c:1044
 ext4_get_block+0x4c/0x60 fs/ext4/inode.c:1061
 ext4_block_write_begin+0x680/0xd1c fs/ext4/inode.c:1332
 ext4_write_begin+0x8a0/0x1370 fs/ext4/ext4_jbd2.h:-1
 generic_perform_write+0x23c/0x7a4 mm/filemap.c:4407
 ext4_buffered_write_iter+0xfc/0x438 fs/ext4/file.c:372
 ext4_file_write_iter+0x1f4/0x1478 fs/ext4/file.c:-1
 iter_file_splice_write+0x758/0xd64 fs/splice.c:660
 do_splice_from fs/splice.c:863 [inline]
 direct_splice_actor+0xec/0x150 fs/splice.c:1114
 splice_direct_to_actor+0x2a0/0x7a8 fs/splice.c:1023
 do_splice_direct_actor+0x140/0x228 fs/splice.c:1157
 do_splice_direct+0x58/0x70 fs/splice.c:1183
 ovl_copy_up_file+0x430/0x608 fs/overlayfs/copy_up.c:347
 ovl_copy_up_tmpfile fs/overlayfs/copy_up.c:877 [inline]
 ovl_do_copy_up fs/overlayfs/copy_up.c:1001 [inline]
 ovl_copy_up_one fs/overlayfs/copy_up.c:1221 [inline]
 ovl_copy_up_flags+0xf8c/0x26ac fs/overlayfs/copy_up.c:1275
 ovl_copy_up+0x24/0x34 fs/overlayfs/copy_up.c:1314
 ovl_xattr_set+0x288/0x48c fs/overlayfs/xattrs.c:54
 ovl_own_xattr_set+0x9c/0xcc fs/overlayfs/xattrs.c:205
 __vfs_setxattr+0x130/0x17c fs/xattr.c:223
 __vfs_setxattr_noperm+0x120/0x5cc fs/xattr.c:257
 __vfs_setxattr_locked+0x114/0x294 fs/xattr.c:318
 vfs_setxattr+0x140/0x2e4 fs/xattr.c:344
 do_setxattr+0x100/0x19c fs/xattr.c:662
 filename_setxattr+0x134/0x1f8 fs/xattr.c:690
 path_setxattrat+0x200/0x2a8 fs/xattr.c:734
 __do_sys_setxattr fs/xattr.c:768 [inline]
 __se_sys_setxattr fs/xattr.c:764 [inline]
 __arm64_sys_setxattr+0xd0/0xec fs/xattr.c:764
 __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: 61 Comm: kworker/u8:4 Tainted: G             L      syzkaller #0 PREEMPT 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Workqueue: events_unbound toggle_allocation_gate
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 : ffff8000921777c0
x29: ffff800092177900 x28: dfff800000000000 x27: 0000000000000001
x26: 0000000000000001 x25: 0000000000000011 x24: 0000000000000001
x23: ffffffffffffffff x22: 1fffe000359cb530 x21: ffff0001ace85068
x20: ffff0000c3d89538 x19: ffff0001ace5a980 x18: 1fffe000359c8628
x17: 0000000000000003 x16: ffff8000898e7000 x15: 0000000000000000
x14: 0000000000000001 x13: 0000000000000001 x12: 0000000000000000
x11: 0000000000000000 x10: ffff6000359d0a0e x9 : 0000000000000000
x8 : 0000000000000011 x7 : 0000000000000000 x6 : ffff80008016923c
x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff8000805c0f30
x2 : 0000000000000000 x1 : ffff0000c3d88000 x0 : 0000000000000000
dump_backtrace(regs = 0000000051e3a856 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
 arch_jump_label_transform_apply+0x14/0x20 arch/arm64/kernel/jump_label.c:34
 __jump_label_update+0x31c/0x344 kernel/jump_label.c:521
 jump_label_update+0x428/0x4b8 kernel/jump_label.c:909
 static_key_disable_cpuslocked+0xd0/0x1dc kernel/jump_label.c:240
 static_key_disable+0x24/0x38 kernel/jump_label.c:248
 toggle_allocation_gate+0x1f4/0x28c mm/kfence/core.c:909
 process_one_work kernel/workqueue.c:3495 [inline]
 process_scheduled_works+0x91c/0x1250 kernel/workqueue.c:3578
 worker_thread+0x798/0xbd0 kernel/workqueue.c:3659
 kthread+0x304/0x3d4 kernel/kthread.c:436
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:854

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/28 10:36 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 sys_setxattr
* Struck through repros no longer work on HEAD.