[fs?] WARNING: bad unlock balance in dentry_unlink_inode

5 views
Skip to first unread message

syzbot

unread,
Apr 27, 2023, 9:08:54 AM4/27/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 622322f53c6d Merge tag 'mips-fixes_6.3_2' of git://git.ker..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=106ff70bc80000
kernel config: https://syzkaller.appspot.com/x/.config?x=11869c60f54496a7
dashboard link: https://syzkaller.appspot.com/bug?extid=460ec481bf10dbc2a570
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: i386
CC: [bra...@kernel.org linux-...@vger.kernel.org linux-...@vger.kernel.org vi...@zeniv.linux.org.uk]

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+460ec4...@syzkaller.appspotmail.com

=====================================
WARNING: bad unlock balance detected!
6.3.0-rc7-syzkaller-00191-g622322f53c6d #0 Not tainted
-------------------------------------
kswapd0/110 is trying to release lock (&sb->s_type->i_lock_key) at:
[<ffffffff81e8f74e>] spin_unlock include/linux/spinlock.h:390 [inline]
[<ffffffff81e8f74e>] dentry_unlink_inode+0x1ee/0x460 fs/dcache.c:395
but there are no more locks to release!

other info that might help us debug this:
3 locks held by kswapd0/110:
#0: ffffffff8c8e7420 (fs_reclaim){+.+.}-{0:0}, at: set_task_reclaim_state mm/vmscan.c:200 [inline]
#0: ffffffff8c8e7420 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x170/0x1ac0 mm/vmscan.c:7338
#1: ffffffff8c89e190 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab_memcg mm/vmscan.c:895 [inline]
#1: ffffffff8c89e190 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x2a0/0x660 mm/vmscan.c:1001
#2: ffff88806fbf00e0 (&type->s_umount_key#58){++++}-{3:3}, at: trylock_super fs/super.c:414 [inline]
#2: ffff88806fbf00e0 (&type->s_umount_key#58){++++}-{3:3}, at: super_cache_scan+0x70/0x590 fs/super.c:79

stack backtrace:
CPU: 2 PID: 110 Comm: kswapd0 Not tainted 6.3.0-rc7-syzkaller-00191-g622322f53c6d #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106
__lock_release kernel/locking/lockdep.c:5346 [inline]
lock_release+0x4f1/0x670 kernel/locking/lockdep.c:5689
__raw_spin_unlock include/linux/spinlock_api_smp.h:141 [inline]
_raw_spin_unlock+0x16/0x40 kernel/locking/spinlock.c:186
spin_unlock include/linux/spinlock.h:390 [inline]
dentry_unlink_inode+0x1ee/0x460 fs/dcache.c:395
__dentry_kill+0x3c0/0x640 fs/dcache.c:607
shrink_dentry_list+0x12c/0x4f0 fs/dcache.c:1201
prune_dcache_sb+0xeb/0x150 fs/dcache.c:1282
super_cache_scan+0x33a/0x590 fs/super.c:104
do_shrink_slab+0x428/0xaa0 mm/vmscan.c:853
shrink_slab_memcg mm/vmscan.c:922 [inline]
shrink_slab+0x388/0x660 mm/vmscan.c:1001
shrink_one+0x502/0x810 mm/vmscan.c:5343
shrink_many mm/vmscan.c:5394 [inline]
lru_gen_shrink_node mm/vmscan.c:5511 [inline]
shrink_node+0x2064/0x35f0 mm/vmscan.c:6459
kswapd_shrink_node mm/vmscan.c:7262 [inline]
balance_pgdat+0xa02/0x1ac0 mm/vmscan.c:7452
kswapd+0x677/0xd60 mm/vmscan.c:7712
kthread+0x2e8/0x3a0 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
</TASK>
------------[ cut here ]------------
pvqspinlock: lock 0xffff888028b1d838 has corrupted value 0x0!
WARNING: CPU: 2 PID: 110 at kernel/locking/qspinlock_paravirt.h:498 __pv_queued_spin_unlock_slowpath+0x231/0x320 kernel/locking/qspinlock_paravirt.h:498
Modules linked in:
CPU: 2 PID: 110 Comm: kswapd0 Not tainted 6.3.0-rc7-syzkaller-00191-g622322f53c6d #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
RIP: 0010:__pv_queued_spin_unlock_slowpath+0x231/0x320 kernel/locking/qspinlock_paravirt.h:498
Code: ea 03 0f b6 14 02 4c 89 e8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 62 41 8b 55 00 4c 89 ee 48 c7 c7 60 b8 4c 8a e8 af e5 47 f7 <0f> 0b e9 6c ff ff ff 0f 0b 48 89 df 4c 89 04 24 e8 3a 8e d0 f7 4c
RSP: 0018:ffffc90000e47548 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff888028b1d998 RCX: 0000000000000000
RDX: ffff88801625ba80 RSI: ffffffff814b6247 RDI: 0000000000000001
RBP: ffff888028b1d838 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 6c6e697073717670 R12: ffff888028b1d840
R13: ffff888028b1d838 R14: 0000000000000000 R15: ffff88801cbae6f8
FS: 0000000000000000(0000) GS:ffff88802c800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000030125000 CR3: 000000001c2ee000 CR4: 0000000000150ee0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__raw_callee_save___pv_queued_spin_unlock_slowpath+0x15/0x30
.slowpath+0x9/0x1a
pv_queued_spin_unlock arch/x86/include/asm/paravirt.h:598 [inline]
queued_spin_unlock arch/x86/include/asm/qspinlock.h:57 [inline]
do_raw_spin_unlock+0x175/0x230 kernel/locking/spinlock_debug.c:141
__raw_spin_unlock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_unlock+0x1e/0x40 kernel/locking/spinlock.c:186
spin_unlock include/linux/spinlock.h:390 [inline]
dentry_unlink_inode+0x1ee/0x460 fs/dcache.c:395
__dentry_kill+0x3c0/0x640 fs/dcache.c:607
shrink_dentry_list+0x12c/0x4f0 fs/dcache.c:1201
prune_dcache_sb+0xeb/0x150 fs/dcache.c:1282
super_cache_scan+0x33a/0x590 fs/super.c:104
do_shrink_slab+0x428/0xaa0 mm/vmscan.c:853
shrink_slab_memcg mm/vmscan.c:922 [inline]
shrink_slab+0x388/0x660 mm/vmscan.c:1001
shrink_one+0x502/0x810 mm/vmscan.c:5343
shrink_many mm/vmscan.c:5394 [inline]
lru_gen_shrink_node mm/vmscan.c:5511 [inline]
shrink_node+0x2064/0x35f0 mm/vmscan.c:6459
kswapd_shrink_node mm/vmscan.c:7262 [inline]
balance_pgdat+0xa02/0x1ac0 mm/vmscan.c:7452
kswapd+0x677/0xd60 mm/vmscan.c:7712
kthread+0x2e8/0x3a0 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
</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 bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If you want to unassign a label, reply with:
#syz unset some-label

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Sep 5, 2023, 4:54:50 PM9/5/23
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages