BUG: soft lockup in sys_fallocate

Status: moderation: reported on 2026/11/30 13:44
Subsystems: arch kvm
Labels: prio:low
[Documentation on labels]
Reported-by: syzbot+9d5563749cc6d809471c@syzkaller.appspotmail.com
First crash: 1h19m, last: 1h19m
✨ AI-generated root cause summary:

This is a false-positive soft lockup on an arm64 virtualized guest caused by hypervisor vCPU preemption/stall time not being excluded by the watchdog detector. While CPU 0 was briefly inside lockdep's lock_acquire() (called from read_lock(&ei->i_prealloc_lock) in ext4_mb_use_preallocated()) with interrupts masked, vCPU 0 was stalled for ~65s, preventing interrupt delivery (including CPU 1's kick_all_cpus_sync() IPI in csd_lock_wait()). Once vCPU 0 resumed and lock_acquire() unmasked interrupts via raw_local_irq_restore(), watchdog_timer_fn() fired and saw a 65s delta because arm64 uses the weak running_clock() returning wall-clock local_clock() and the no-op kvm_check_and_clear_guest_paused() stub returning false.

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

Root Cause Analysis

This soft lockup report on CPU 0 (watchdog: BUG: soft lockup - CPU#0 stuck for 65s! [syz.5.830:10379]) is not caused by a deadlock or infinite loop in ext4 or lockdep. Instead, it is a spurious (false-positive) soft lockup resulting from an external ~65-second vCPU stall/hypervisor preemption while CPU 0 had interrupts masked inside lock_acquire(), combined with arm64's lack of hypervisor paused/steal-time exclusion in the softlockup watchdog.

Technical Breakdown & Evidence

  1. No deadlock or preemption-disabled loop in ext4:

    • Task syz.5.830 entered fallocate -> ext4_fallocate() -> ext4_do_fallocate() -> ext4_alloc_file_blocks() -> ext4_map_blocks() -> ext4_map_create_blocks() -> ext4_ext_map_blocks() -> ext4_mb_new_blocks() (fs/ext4/mballoc.c:6300) -> ext4_mb_use_preallocated() (fs/ext4/mballoc.c:4896).
    • ext4_mb_new_blocks() calls might_sleep() at fs/ext4/mballoc.c:6240. With CONFIG_PREEMPT=y and CONFIG_DEBUG_ATOMIC_SLEEP=y enabled in this kernel, reaching line 6300 without an atomic-sleep splat confirms that preempt_count() == 0 and interrupts were enabled immediately prior to entering ext4_mb_use_preallocated().
    • syz.5.830 only recorded 65 IRQ-trace events (irq event stamp: 41763) since fpsimd_restore_current_state() (arch/arm64/kernel/fpsimd.c:1780, called on return to userspace from arch_exit_to_user_mode_work()) at event 41698, with the most recent hardirq enable at 41763 inside lookup_bh_lru() (fs/buffer.c:1291). Thus, syz.5.830 was not spinning in ext4_alloc_file_blocks() for 65 seconds, nor could a preempt_count() == 0 loop prevent migration/0 (stop_sched_class, running softlockup_fn()) from preempting it under CONFIG_PREEMPT=y.
    • At fs/ext4/mballoc.c:4896, ext4_mb_use_preallocated() calls read_lock(&ei->i_prealloc_lock) (__raw_read_lock() in include/linux/rwlock_api_smp.h:162-164). CPU 0 had not reached LOCK_CONTENDED(..., do_raw_read_lock) yet, so it was not spinning on ei->i_prealloc_lock.
  2. Exact interruption point in lock_acquire() and correlation with CPU 1:

    • CPU 0's pc is at lock_acquire+0x168/0x320 (arch_local_irq_restore() via raw_local_irq_restore(flags) at kernel/locking/lockdep.c:5946), immediately after lockdep_recursion_finish() (lr at kernel/locking/lockdep.c:5945).
    • lock_acquire() masks interrupts via raw_local_irq_save(flags) (kernel/locking/lockdep.c:5938), runs __lock_acquire(), and unmasks interrupts at line 5946 (raw_local_irq_restore(flags)). The watchdog timer IRQ fired on the exact instruction unmasking IRQs.
    • Simultaneously, the backtrace for CPU 1 (kworker/1:9) shows jump_label_update_timeout() (kernel/jump_label.c:325) -> __static_key_slow_dec() -> arch_jump_label_transform_apply() -> kick_all_cpus_sync() -> smp_call_function_many_cond() -> csd_lock_wait() (kernel/smp.c:389). CPU 1 was blocked waiting for CPU 0 to acknowledge the synchronization IPI because vCPU 0 was stalled/had IRQs masked during the ~65-second interval.
  3. Missing hypervisor pause / steal-time accounting on arm64:

    • In kernel/watchdog.c:836-873, watchdog_timer_fn() computes now = get_timestamp() (running_clock() >> 30LL, kernel/watchdog.c:667) and calls kvm_check_and_clear_guest_paused() (kernel/watchdog.c:841) before evaluating is_softlockup(touch_ts, period_ts, now).
    • On arm64, running_clock() (kernel/sched/clock.c:508) is not overridden by architecture/paravirt code and falls back to local_clock(), which continues advancing with wall-clock time while the guest vCPU is paused/preempted by the hypervisor.
    • Likewise, arm64 uses the generic kvm_check_and_clear_guest_paused() stub (include/asm-generic/kvm_para.h:12), which unconditionally returns false.
    • Consequently, when vCPU 0 resumed from the ~65-second stall inside lock_acquire() and unmasked IRQs at raw_local_irq_restore(), watchdog_timer_fn() observed now - watchdog_touch_ts == 65s and reported a soft lockup.
▶ ▼ ✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision
c787938a assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ❌ FuzzingArtifact: ❌ MemoryCorruption: ❌ NetworkNeedsSetup: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ❌ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ BUG: soft lockup in sys_fallocate 2026/11/30 13:35 2026/11/30 13:35 2026/11/30 13:44 e1f06033
▶ ▼ Similar bugs (6)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in sys_fallocate (6) prio:high mm 1 2 210d 258d 0/30 auto-obsoleted due to no activity on 2026/08/02 11:16
upstream INFO: rcu detected stall in sys_fallocate (2) ext4 1 1 1557d 1557d 0/30 auto-obsoleted due to no activity on 2022/11/24 05:24
upstream INFO: rcu detected stall in sys_fallocate (4) mm 1 1 798d 798d 0/30 auto-obsoleted due to no activity on 2024/12/22 03:36
upstream INFO: rcu detected stall in sys_fallocate (5) mm 1 1 523d 523d 0/30 auto-obsoleted due to no activity on 2025/09/23 13:27
upstream INFO: rcu detected stall in sys_fallocate (3) mm 1 4 892d 906d 0/30 auto-obsoleted due to no activity on 2024/09/18 18:49
upstream INFO: rcu detected stall in sys_fallocate ext4 1 1 1789d 1789d 0/30 closed as invalid on 2022/02/08 09:50

Sample crash report:
watchdog: BUG: soft lockup - CPU#0 stuck for 65s! [syz.5.830:10379]
Modules linked in:
irq event stamp: 41763
hardirqs last  enabled at (41763): [<ffff800080e26600>] lookup_bh_lru fs/buffer.c:1291 [inline]
hardirqs last  enabled at (41763): [<ffff800080e26600>] find_get_block_common+0x1a4/0xa1c fs/buffer.c:1305
hardirqs last disabled at (41762): [<ffff800080e264c8>] lookup_bh_lru fs/buffer.c:1268 [inline]
hardirqs last disabled at (41762): [<ffff800080e264c8>] find_get_block_common+0x6c/0xa1c fs/buffer.c:1305
softirqs last  enabled at (41698): [<ffff80008013ab20>] local_bh_enable include/linux/bottom_half.h:33 [inline]
softirqs last  enabled at (41698): [<ffff80008013ab20>] put_cpu_fpsimd_context arch/arm64/kernel/fpsimd.c:251 [inline]
softirqs last  enabled at (41698): [<ffff80008013ab20>] fpsimd_restore_current_state+0x39c/0x9c8 arch/arm64/kernel/fpsimd.c:1780
softirqs last disabled at (41696): [<ffff80008013a7c8>] local_bh_disable include/linux/bottom_half.h:20 [inline]
softirqs last disabled at (41696): [<ffff80008013a7c8>] get_cpu_fpsimd_context arch/arm64/kernel/fpsimd.c:234 [inline]
softirqs last disabled at (41696): [<ffff80008013a7c8>] fpsimd_restore_current_state+0x44/0x9c8 arch/arm64/kernel/fpsimd.c:1773
CPU: 0 UID: 0 PID: 10379 Comm: syz.5.830 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 : ffff800093c27210
x29: ffff800093c27260 x28: 0000000000000000 x27: ffff0000cd36bb00
x26: ffff8000898842f8 x25: 0000000000000000 x24: 0000000000000001
x23: 0000000000000001 x22: ffff0000f54a0fd8 x21: ffff8000810d22c0
x20: 0000000000000000 x19: 0000000000000000 x18: ffff8001235bf000
x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
x14: 000000000059da54 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 : ffff0000cd36bb00 x0 : 0000000000000000
dump_backtrace(regs = 000000007e1faafd 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_read_lock include/linux/rwlock_api_smp.h:163 [inline]
 _raw_read_lock+0x58/0x74 kernel/locking/spinlock.c:263
 ext4_mb_use_preallocated+0xc8/0x1108 fs/ext4/mballoc.c:4896
 ext4_mb_new_blocks+0x510/0x3b60 fs/ext4/mballoc.c:6300
 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_alloc_file_blocks+0x3c0/0x121c fs/ext4/extents.c:4665
 ext4_do_fallocate+0x1d8/0xa08 fs/ext4/extents.c:4937
 ext4_fallocate+0x248/0x3cc fs/ext4/extents.c:5012
 vfs_fallocate+0x514/0x650 fs/open.c:338
 ksys_fallocate+0x58/0xa4 fs/open.c:362
 __do_sys_fallocate fs/open.c:367 [inline]
 __se_sys_fallocate fs/open.c:365 [inline]
 __arm64_sys_fallocate+0xa8/0xc4 fs/open.c:365
 __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 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 4915 Comm: kworker/1:9 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 jump_label_update_timeout
pstate: 63400005 (nZCv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
pc : handle_softirqs+0x240/0xce0 kernel/softirq.c:657
lr : handle_softirqs+0x23c/0xce0 kernel/softirq.c:653
sp : ffff80008f957ef0
x29: ffff80008f957f80 x28: dfff800000000000 x27: ffff0000cd391d80
x26: 0000000000000000 x25: ffff0000cd391d88 x24: 0000000000000082
x23: 1fffe00019a723b1 x22: 1fffe00019a723b1 x21: ffff800089899580
x20: ffff0000cd391d90 x19: ffff0001ace7e580 x18: ffff8001235e5000
x17: ffff8001235e5000 x16: ffff80008f950000 x15: 0098968000000000
x14: 7fffffffffffffff x13: 0000000000000001 x12: f5ff8000805c0f24
x11: ffff800080155584 x10: ffff8000886b7f3a x9 : ffff8001235e5000
x8 : 0000000000000000 x7 : 0000000000000000 x6 : ffff80008056412c
x5 : 0000000000000000 x4 : 0000000000000008 x3 : ffff80008015562c
x2 : 0000000000000000 x1 : ffff0000cd391d80 x0 : ffff800080324e7c
dump_backtrace(regs = 0000000047f8a114 tsk = 0000000000000000)
Call trace:
 __daif_local_irq_enable arch/arm64/include/asm/irqflags.h:26 [inline] (P)
 arch_local_irq_enable arch/arm64/include/asm/irqflags.h:48 [inline] (P)
 handle_softirqs+0x240/0xce0 kernel/softirq.c:653 (P)
 __do_softirq+0x14/0x20 kernel/softirq.c:703
 ____do_softirq+0x10/0x1c arch/arm64/kernel/irq.c:78
 call_on_irq_stack+0x30/0x48 arch/arm64/kernel/entry.S:901
 do_softirq_own_stack+0x1c/0x28 arch/arm64/kernel/irq.c:83
 invoke_softirq kernel/softirq.c:549 [inline]
 __irq_exit_rcu+0x10c/0x324 kernel/softirq.c:786
 irq_exit_rcu+0x14/0x84 kernel/softirq.c:809
 __el1_irq arch/arm64/kernel/entry-common.c:570 [inline]
 el1_interrupt+0x40/0x60 arch/arm64/kernel/entry-common.c:582
 el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:587
 el1h_64_irq+0x78/0x7c arch/arm64/kernel/entry.S:602
 __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_slow_dec_cpuslocked+0xc4/0x138 kernel/jump_label.c:315
 __static_key_slow_dec kernel/jump_label.c:321 [inline]
 jump_label_update_timeout+0x28/0x3c kernel/jump_label.c:329
 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/30 13:35 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_fallocate
* Struck through repros no longer work on HEAD.