Re: [syzbot] [reiserfs?] possible deadlock in super_lock

From: syzbot
Date: Fri Sep 22 2023 - 23:02:36 EST


Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
WARNING in dquot_disable

------------[ cut here ]------------
WARNING: CPU: 0 PID: 5401 at fs/quota/dquot.c:2217 dquot_disable+0xff1/0x1710 fs/quota/dquot.c:2217
Modules linked in:
CPU: 0 PID: 5401 Comm: syz-executor.0 Not tainted 6.6.0-rc2-syzkaller-00018-g2cf0f7156238-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
RIP: 0010:dquot_disable+0xff1/0x1710 fs/quota/dquot.c:2217
Code: d2 0f 85 fd 04 00 00 8b 15 48 34 c1 0c 48 c7 c6 ff ff ff ff 48 c7 c7 a0 f4 34 92 e8 19 41 46 02 e9 6f f7 ff ff e8 4f 43 7a ff <0f> 0b 48 89 ef e8 25 95 59 ff e9 a6 f0 ff ff e8 3b 43 7a ff 4c 8d
RSP: 0018:ffffc9000382fb60 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
RDX: ffff8880287c0140 RSI: ffffffff820c8201 RDI: 0000000000000005
RBP: ffff888077efc070 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
R13: ffff888077efc000 R14: ffffffff8aa27800 R15: 1ffff92000705f79
FS: 0000555555e27480(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb752142378 CR3: 00000000212c7000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
reiserfs_quota_off+0x11f/0x160 fs/reiserfs/super.c:2480
reiserfs_quota_off_umount fs/reiserfs/super.c:581 [inline]
reiserfs_put_super+0x8f/0x5c0 fs/reiserfs/super.c:594
generic_shutdown_super+0x2ab/0x400 fs/super.c:727
kill_block_super+0x3b/0x70 fs/super.c:1650
deactivate_locked_super+0x9a/0x170 fs/super.c:481
deactivate_super+0xde/0x100 fs/super.c:514
cleanup_mnt+0x222/0x3d0 fs/namespace.c:1254
task_work_run+0x14d/0x240 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop kernel/entry/common.c:171 [inline]
exit_to_user_mode_prepare+0x210/0x240 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296
do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7effb087de17
Code: b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffc59c8ec28 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007effb087de17
RDX: 0000000000000000 RSI: 000000000000000a RDI: 00007ffc59c8ece0
RBP: 00007ffc59c8ece0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffc59c8fda0
R13: 00007effb08c73b9 R14: 000000000001d8a7 R15: 0000000000000005
</TASK>


Tested on:

commit: 2cf0f715 Merge tag 'nfs-for-6.6-2' of git://git.linux-..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=17d0480a680000
kernel config: https://syzkaller.appspot.com/x/.config?x=710dc49bece494df
dashboard link: https://syzkaller.appspot.com/bug?extid=062317ea1d0a6d5e29e7
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=11959f5c680000