| Title | Replies (including bot) | Last reply |
|---|---|---|
| [syzbot] [xfs?] possible deadlock in xfs_trans_alloc | 0 (1) | 2025/12/07 00:10 |
syzbot |
sign-in | mailing list | source | docs |
| Title | Replies (including bot) | Last reply |
|---|---|---|
| [syzbot] [xfs?] possible deadlock in xfs_trans_alloc | 0 (1) | 2025/12/07 00:10 |
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kswapd0/78 is trying to acquire lock:
ffff88801f51a610 (sb_internal#2){.+.+}-{0:0}, at: xfs_trans_alloc+0xd7/0x960 fs/xfs/xfs_trans.c:256
but task is already holding lock:
ffffffff8e251780 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat mm/vmscan.c:6973 [inline]
ffffffff8e251780 (fs_reclaim){+.+.}-{0:0}, at: kswapd+0x92a/0x2820 mm/vmscan.c:7352
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (fs_reclaim){+.+.}-{0:0}:
__fs_reclaim_acquire mm/page_alloc.c:4301 [inline]
fs_reclaim_acquire+0x72/0x100 mm/page_alloc.c:4315
might_alloc include/linux/sched/mm.h:317 [inline]
slab_pre_alloc_hook mm/slub.c:4904 [inline]
slab_alloc_node mm/slub.c:5239 [inline]
__kmalloc_cache_noprof+0x40/0x700 mm/slub.c:5771
kmalloc_noprof include/linux/slab.h:957 [inline]
iomap_fill_dirty_folios+0xf4/0x260 fs/iomap/buffered-io.c:1557
xfs_buffered_write_iomap_begin+0xa23/0x1a70 fs/xfs/xfs_iomap.c:1857
iomap_iter+0x5ef/0xeb0 fs/iomap/iter.c:110
iomap_zero_range+0x1cc/0xa30 fs/iomap/buffered-io.c:1590
xfs_zero_range+0x9a/0x100 fs/xfs/xfs_iomap.c:2289
xfs_free_file_space+0x8ad/0xcc0 fs/xfs/xfs_bmap_util.c:900
xfs_falloc_zero_range fs/xfs/xfs_file.c:1281 [inline]
__xfs_file_fallocate+0x91b/0x15f0 fs/xfs/xfs_file.c:1396
xfs_file_fallocate+0x27b/0x340 fs/xfs/xfs_file.c:1462
vfs_fallocate+0x669/0x7e0 fs/open.c:339
ksys_fallocate fs/open.c:363 [inline]
__do_sys_fallocate fs/open.c:368 [inline]
__se_sys_fallocate fs/open.c:366 [inline]
__x64_sys_fallocate+0xc0/0x110 fs/open.c:366
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #1 (&xfs_nondir_ilock_class){++++}-{4:4}:
down_write_nested+0x9d/0x200 kernel/locking/rwsem.c:1706
xfs_trans_alloc_inode+0x161/0x4a0 fs/xfs/xfs_trans.c:1082
xfs_alloc_file_space+0x496/0x9b0 fs/xfs/xfs_bmap_util.c:731
xfs_falloc_allocate_range fs/xfs/xfs_file.c:1342 [inline]
__xfs_file_fallocate+0xf8b/0x15f0 fs/xfs/xfs_file.c:1402
xfs_file_fallocate+0x27b/0x340 fs/xfs/xfs_file.c:1462
vfs_fallocate+0x669/0x7e0 fs/open.c:339
ksys_fallocate fs/open.c:363 [inline]
__do_sys_fallocate fs/open.c:368 [inline]
__se_sys_fallocate fs/open.c:366 [inline]
__x64_sys_fallocate+0xc0/0x110 fs/open.c:366
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #0 (sb_internal#2){.+.+}-{0:0}:
check_prev_add kernel/locking/lockdep.c:3165 [inline]
check_prevs_add kernel/locking/lockdep.c:3284 [inline]
validate_chain kernel/locking/lockdep.c:3908 [inline]
__lock_acquire+0x15a6/0x2cf0 kernel/locking/lockdep.c:5237
lock_acquire+0x117/0x340 kernel/locking/lockdep.c:5868
percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline]
percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline]
__sb_start_write include/linux/fs/super.h:19 [inline]
sb_start_intwrite include/linux/fs/super.h:177 [inline]
__xfs_trans_alloc+0xad/0x420 fs/xfs/xfs_trans.c:224
xfs_trans_alloc+0xd7/0x960 fs/xfs/xfs_trans.c:256
xfs_fs_dirty_inode+0x12f/0x1e0 fs/xfs/xfs_super.c:735
__mark_inode_dirty+0x390/0x1330 fs/fs-writeback.c:2587
mark_inode_dirty_sync include/linux/fs.h:2200 [inline]
iput+0x3e8/0x1030 fs/inode.c:1984
__dentry_kill+0x209/0x660 fs/dcache.c:670
shrink_kill+0xa9/0x2c0 fs/dcache.c:1137
shrink_dentry_list+0x2e0/0x5e0 fs/dcache.c:1164
prune_dcache_sb+0x10e/0x180 fs/dcache.c:1246
super_cache_scan+0x369/0x4b0 fs/super.c:222
do_shrink_slab+0x6df/0x10d0 mm/shrinker.c:437
shrink_slab_memcg mm/shrinker.c:550 [inline]
shrink_slab+0x7ef/0x10d0 mm/shrinker.c:628
shrink_one+0x2d9/0x720 mm/vmscan.c:4919
shrink_many mm/vmscan.c:4980 [inline]
lru_gen_shrink_node mm/vmscan.c:5058 [inline]
shrink_node+0x2f7d/0x35b0 mm/vmscan.c:6045
kswapd_shrink_node mm/vmscan.c:6899 [inline]
balance_pgdat mm/vmscan.c:7082 [inline]
kswapd+0x145a/0x2820 mm/vmscan.c:7352
kthread+0x711/0x8a0 kernel/kthread.c:463
ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
other info that might help us debug this:
Chain exists of:
sb_internal#2 --> &xfs_nondir_ilock_class --> fs_reclaim
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(fs_reclaim);
lock(&xfs_nondir_ilock_class);
lock(fs_reclaim);
rlock(sb_internal#2);
*** DEADLOCK ***
2 locks held by kswapd0/78:
#0: ffffffff8e251780 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat mm/vmscan.c:6973 [inline]
#0: ffffffff8e251780 (fs_reclaim){+.+.}-{0:0}, at: kswapd+0x92a/0x2820 mm/vmscan.c:7352
#1: ffff88801f51a0e0 (&type->s_umount_key#51){++++}-{4:4}, at: super_trylock_shared fs/super.c:563 [inline]
#1: ffff88801f51a0e0 (&type->s_umount_key#51){++++}-{4:4}, at: super_cache_scan+0x91/0x4b0 fs/super.c:197
stack backtrace:
CPU: 0 UID: 0 PID: 78 Comm: kswapd0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2043
check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175
check_prev_add kernel/locking/lockdep.c:3165 [inline]
check_prevs_add kernel/locking/lockdep.c:3284 [inline]
validate_chain kernel/locking/lockdep.c:3908 [inline]
__lock_acquire+0x15a6/0x2cf0 kernel/locking/lockdep.c:5237
lock_acquire+0x117/0x340 kernel/locking/lockdep.c:5868
percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline]
percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline]
__sb_start_write include/linux/fs/super.h:19 [inline]
sb_start_intwrite include/linux/fs/super.h:177 [inline]
__xfs_trans_alloc+0xad/0x420 fs/xfs/xfs_trans.c:224
xfs_trans_alloc+0xd7/0x960 fs/xfs/xfs_trans.c:256
xfs_fs_dirty_inode+0x12f/0x1e0 fs/xfs/xfs_super.c:735
__mark_inode_dirty+0x390/0x1330 fs/fs-writeback.c:2587
mark_inode_dirty_sync include/linux/fs.h:2200 [inline]
iput+0x3e8/0x1030 fs/inode.c:1984
__dentry_kill+0x209/0x660 fs/dcache.c:670
shrink_kill+0xa9/0x2c0 fs/dcache.c:1137
shrink_dentry_list+0x2e0/0x5e0 fs/dcache.c:1164
prune_dcache_sb+0x10e/0x180 fs/dcache.c:1246
super_cache_scan+0x369/0x4b0 fs/super.c:222
do_shrink_slab+0x6df/0x10d0 mm/shrinker.c:437
shrink_slab_memcg mm/shrinker.c:550 [inline]
shrink_slab+0x7ef/0x10d0 mm/shrinker.c:628
shrink_one+0x2d9/0x720 mm/vmscan.c:4919
shrink_many mm/vmscan.c:4980 [inline]
lru_gen_shrink_node mm/vmscan.c:5058 [inline]
shrink_node+0x2f7d/0x35b0 mm/vmscan.c:6045
kswapd_shrink_node mm/vmscan.c:6899 [inline]
balance_pgdat mm/vmscan.c:7082 [inline]
kswapd+0x145a/0x2820 mm/vmscan.c:7352
kthread+0x711/0x8a0 kernel/kthread.c:463
ret_from_fork+0x599/0xb30 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
</TASK>
| Time | Kernel | Commit | Syzkaller | Config | Log | Report | Syz repro | C repro | VM info | Assets (help?) | Manager | Title |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2025/12/13 10:14 | upstream | 9551a26f17d9 | d1b870e1 | .config | console log | report | [disk image (non-bootable)] [vmlinux] [kernel image] | ci-snapshot-upstream-root | possible deadlock in xfs_trans_alloc | |||
| 2025/12/13 04:24 | upstream | 187d0801404f | d1b870e1 | .config | console log | report | [disk image (non-bootable)] [vmlinux] [kernel image] | ci-snapshot-upstream-root | possible deadlock in xfs_trans_alloc | |||
| 2025/12/11 14:24 | upstream | d358e5254674 | d1b870e1 | .config | console log | report | [disk image (non-bootable)] [vmlinux] [kernel image] | ci-snapshot-upstream-root | possible deadlock in xfs_trans_alloc | |||
| 2025/12/11 12:23 | upstream | d358e5254674 | d1b870e1 | .config | console log | report | [disk image (non-bootable)] [vmlinux] [kernel image] | ci-snapshot-upstream-root | possible deadlock in xfs_trans_alloc | |||
| 2025/12/09 16:35 | upstream | cb015814f8b6 | d1b870e1 | .config | console log | report | [disk image (non-bootable)] [vmlinux] [kernel image] | ci-snapshot-upstream-root | possible deadlock in xfs_trans_alloc | |||
| 2025/12/08 02:54 | upstream | 37bb2e7217b0 | d1b870e1 | .config | console log | report | [disk image (non-bootable)] [vmlinux] [kernel image] | ci-snapshot-upstream-root | possible deadlock in xfs_trans_alloc | |||
| 2025/12/03 00:06 | upstream | 4a26e7032d7d | d1b870e1 | .config | console log | report | [disk image (non-bootable)] [vmlinux] [kernel image] | ci-snapshot-upstream-root | possible deadlock in xfs_trans_alloc |