Hello,
syzbot found the following issue on:
HEAD commit: 2ccb4d203fe4 Merge tag 'for-linus' of git://
git.kernel.org..
git tree: upstream
console output:
https://syzkaller.appspot.com/x/log.txt?x=11239ee2580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=e0e74def2d38a839
dashboard link:
https://syzkaller.appspot.com/bug?extid=a12845fa0e9f51f7a601
compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image (non-bootable):
https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-2ccb4d20.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/749f87aeac3d/vmlinux-2ccb4d20.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/0c8888fbaabd/bzImage-2ccb4d20.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+a12845...@syzkaller.appspotmail.com
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kswapd0/72 is trying to acquire lock:
ffff888042915ad8 (&info->bfs_lock){+.+.}-{4:4}, at: bfs_evict_inode+0x274/0x510 fs/bfs/inode.c:183
but task is already holding lock:
ffffffff8de44f40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat mm/vmscan.c:7015 [inline]
ffffffff8de44f40 (fs_reclaim){+.+.}-{0:0}, at: kswapd+0x951/0x2800 mm/vmscan.c:7389
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (fs_reclaim){+.+.}-{0:0}:
lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
__fs_reclaim_acquire mm/page_alloc.c:4269 [inline]
fs_reclaim_acquire+0x72/0x100 mm/page_alloc.c:4283
might_alloc include/linux/sched/mm.h:318 [inline]
slab_pre_alloc_hook mm/slub.c:4897 [inline]
slab_alloc_node mm/slub.c:5221 [inline]
kmem_cache_alloc_lru_noprof+0x4a/0x6d0 mm/slub.c:5264
bfs_alloc_inode+0x28/0x40 fs/bfs/inode.c:240
alloc_inode+0x67/0x1b0 fs/inode.c:346
iget_locked+0x106/0x580 fs/inode.c:1445
bfs_iget+0x28/0xaa0 fs/bfs/inode.c:42
bfs_lookup+0x150/0x1d0 fs/bfs/dir.c:141
lookup_one_qstr_excl+0x12e/0x360 fs/namei.c:1705
do_renameat2+0x3dd/0xa50 fs/namei.c:5317
__do_sys_rename fs/namei.c:5411 [inline]
__se_sys_rename fs/namei.c:5409 [inline]
__x64_sys_rename+0x82/0x90 fs/namei.c:5409
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #0 (&info->bfs_lock){+.+.}-{4:4}:
check_prev_add kernel/locking/lockdep.c:3165 [inline]
check_prevs_add kernel/locking/lockdep.c:3284 [inline]
validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3908
__lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237
lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
__mutex_lock_common kernel/locking/mutex.c:598 [inline]
__mutex_lock+0x187/0x1350 kernel/locking/mutex.c:760
bfs_evict_inode+0x274/0x510 fs/bfs/inode.c:183
evict+0x501/0x9c0 fs/inode.c:810
__dentry_kill+0x209/0x660 fs/dcache.c:669
shrink_kill+0xa9/0x2c0 fs/dcache.c:1114
shrink_dentry_list+0x2e0/0x5e0 fs/dcache.c:1141
prune_dcache_sb+0x10e/0x180 fs/dcache.c:1222
super_cache_scan+0x369/0x4b0 fs/super.c:222
do_shrink_slab+0x6ef/0x1110 mm/shrinker.c:437
shrink_slab_memcg mm/shrinker.c:550 [inline]
shrink_slab+0x7ef/0x10d0 mm/shrinker.c:628
shrink_one+0x28a/0x7c0 mm/vmscan.c:4955
shrink_many mm/vmscan.c:5016 [inline]
lru_gen_shrink_node mm/vmscan.c:5094 [inline]
shrink_node+0x315d/0x3780 mm/vmscan.c:6081
kswapd_shrink_node mm/vmscan.c:6941 [inline]
balance_pgdat mm/vmscan.c:7124 [inline]
kswapd+0x147c/0x2800 mm/vmscan.c:7389
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x436/0x7d0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(fs_reclaim);
lock(&info->bfs_lock);
lock(fs_reclaim);
lock(&info->bfs_lock);
*** DEADLOCK ***
2 locks held by kswapd0/72:
#0: ffffffff8de44f40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat mm/vmscan.c:7015 [inline]
#0: ffffffff8de44f40 (fs_reclaim){+.+.}-{0:0}, at: kswapd+0x951/0x2800 mm/vmscan.c:7389
#1: ffff888010fbc0e0 (&type->s_umount_key#51){++++}-{4:4}, at: super_trylock_shared fs/super.c:562 [inline]
#1: ffff888010fbc0e0 (&type->s_umount_key#51){++++}-{4:4}, at: super_cache_scan+0x91/0x4b0 fs/super.c:197
stack backtrace:
CPU: 0 UID: 0 PID: 72 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+0x2ee/0x310 kernel/locking/lockdep.c:2043
check_noncircular+0x134/0x160 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+0xb9b/0x2140 kernel/locking/lockdep.c:3908
__lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5237
lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868
__mutex_lock_common kernel/locking/mutex.c:598 [inline]
__mutex_lock+0x187/0x1350 kernel/locking/mutex.c:760
bfs_evict_inode+0x274/0x510 fs/bfs/inode.c:183
evict+0x501/0x9c0 fs/inode.c:810
__dentry_kill+0x209/0x660 fs/dcache.c:669
shrink_kill+0xa9/0x2c0 fs/dcache.c:1114
shrink_dentry_list+0x2e0/0x5e0 fs/dcache.c:1141
prune_dcache_sb+0x10e/0x180 fs/dcache.c:1222
super_cache_scan+0x369/0x4b0 fs/super.c:222
do_shrink_slab+0x6ef/0x1110 mm/shrinker.c:437
shrink_slab_memcg mm/shrinker.c:550 [inline]
shrink_slab+0x7ef/0x10d0 mm/shrinker.c:628
shrink_one+0x28a/0x7c0 mm/vmscan.c:4955
shrink_many mm/vmscan.c:5016 [inline]
lru_gen_shrink_node mm/vmscan.c:5094 [inline]
shrink_node+0x315d/0x3780 mm/vmscan.c:6081
kswapd_shrink_node mm/vmscan.c:6941 [inline]
balance_pgdat mm/vmscan.c:7124 [inline]
kswapd+0x147c/0x2800 mm/vmscan.c:7389
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x436/0x7d0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup