[syzbot] [gfs2?] WARNING: locking bug in gfs2_fill_super

6 views
Skip to first unread message

syzbot

unread,
Jun 2, 2024, 1:48:23 AMJun 2
to agru...@redhat.com, gf...@lists.linux.dev, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 9d99040b1bc8 Add linux-next specific files for 20240529
git tree: linux-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=16d60fc6980000
kernel config: https://syzkaller.appspot.com/x/.config?x=735e953fee00ec19
dashboard link: https://syzkaller.appspot.com/bug?extid=ee157488ade46c021ef4
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1478a914980000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=129b10f2980000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f0deeb27b28b/disk-9d99040b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5acd2205cee1/vmlinux-9d99040b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/222eebb6b9d8/bzImage-9d99040b.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/3ec737951e4a/mount_0.gz

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

gfs2: fsid=(�[{{{+: Trying to join cluster "lock_nolock", "(�[{{{+"
gfs2: fsid=(�[{{{+: Now mounting FS (format 0)...
gfs2: fsid=(�[{{{+: can't read superblock: -22
------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(1)
WARNING: CPU: 0 PID: 5095 at kernel/locking/lockdep.c:233 hlock_class kernel/locking/lockdep.c:233 [inline]
WARNING: CPU: 0 PID: 5095 at kernel/locking/lockdep.c:233 check_wait_context kernel/locking/lockdep.c:4824 [inline]
WARNING: CPU: 0 PID: 5095 at kernel/locking/lockdep.c:233 __lock_acquire+0x570/0x2000 kernel/locking/lockdep.c:5144
Modules linked in:
CPU: 0 PID: 5095 Comm: syz-executor136 Not tainted 6.10.0-rc1-next-20240529-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
RIP: 0010:hlock_class kernel/locking/lockdep.c:233 [inline]
RIP: 0010:check_wait_context kernel/locking/lockdep.c:4824 [inline]
RIP: 0010:__lock_acquire+0x570/0x2000 kernel/locking/lockdep.c:5144
Code: 00 00 83 3d 81 3e 3b 0e 00 75 23 90 48 c7 c7 e0 b9 ca 8b 48 c7 c6 80 bc ca 8b e8 eb e3 e5 ff 48 ba 00 00 00 00 00 fc ff df 90 <0f> 0b 90 90 90 31 db 48 81 c3 c4 00 00 00 48 89 d8 48 c1 e8 03 0f
RSP: 0018:ffffc9000334f4d0 EFLAGS: 00010046
RAX: 00d8e5bcc1ba5400 RBX: 0000000000000661 RCX: ffff888025c7bc00
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000005 R08: ffffffff81586802 R09: 1ffff1101728519a
R10: dffffc0000000000 R11: ffffed101728519b R12: ffff888025c7c728
R13: ffff888025c7c6d8 R14: ffff888025c7c6d8 R15: ffff888025c7bc00
FS: 00005555837eb380(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffecc139b24 CR3: 0000000075252000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5817
touch_wq_lockdep_map kernel/workqueue.c:3895 [inline]
__flush_workqueue+0x1c9/0x1710 kernel/workqueue.c:3937
drain_workqueue+0xc9/0x3a0 kernel/workqueue.c:4101
destroy_workqueue+0xba/0xc40 kernel/workqueue.c:5817
gfs2_fill_super+0x12a4/0x2520 fs/gfs2/ops_fstype.c:1311
get_tree_bdev+0x3f7/0x570 fs/super.c:1615
gfs2_get_tree+0x54/0x220 fs/gfs2/ops_fstype.c:1330
vfs_get_tree+0x90/0x2a0 fs/super.c:1780
do_new_mount+0x2be/0xb40 fs/namespace.c:3352
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3875
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1df5f5ad7a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffea18b22f8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffea18b2300 RCX: 00007f1df5f5ad7a
RDX: 0000000020000000 RSI: 00000000200001c0 RDI: 00007ffea18b2300
RBP: 0000000000000004 R08: 00007ffea18b2340 R09: 0000000000012795
R10: 0000000000008c1b R11: 0000000000000282 R12: 00007ffea18b2340
R13: 0000000000000003 R14: 0000000001000000 R15: 0000000000000001
</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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

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

Edward Adam Davis

unread,
Jun 6, 2024, 9:28:36 AMJun 6
to syzbot+ee1574...@syzkaller.appspotmail.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
please test wr in gfs2_fill_super

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 9d99040b1bc8

diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 0561edd6cc86..7288a6221fde 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -1308,6 +1308,7 @@ static int gfs2_fill_super(struct super_block *sb, struct fs_context *fc)
fail_delete_wq:
destroy_workqueue(sdp->sd_delete_wq);
fail_glock_wq:
+ flush_workqueue(sdp->sd_glock_wq);
destroy_workqueue(sdp->sd_glock_wq);
fail_free:
free_sbd(sdp);

syzbot

unread,
Jun 6, 2024, 9:38:07 AMJun 6
to ead...@qq.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

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

loop0: detected capacity change from 0 to 32768
gfs2: fsid=(�[{{{+: Trying to join cluster "lock_nolock", "(�[{{{+"
gfs2: fsid=(�[{{{+: Now mounting FS (format 0)...
gfs2: fsid=(�[{{{+: can't read superblock: -22
------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(1)
WARNING: CPU: 0 PID: 5932 at kernel/locking/lockdep.c:233 hlock_class kernel/locking/lockdep.c:233 [inline]
WARNING: CPU: 0 PID: 5932 at kernel/locking/lockdep.c:233 check_wait_context kernel/locking/lockdep.c:4824 [inline]
WARNING: CPU: 0 PID: 5932 at kernel/locking/lockdep.c:233 __lock_acquire+0x570/0x2000 kernel/locking/lockdep.c:5144
Modules linked in:
CPU: 0 PID: 5932 Comm: syz-executor Not tainted 6.10.0-rc1-next-20240529-syzkaller-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
RIP: 0010:hlock_class kernel/locking/lockdep.c:233 [inline]
RIP: 0010:check_wait_context kernel/locking/lockdep.c:4824 [inline]
RIP: 0010:__lock_acquire+0x570/0x2000 kernel/locking/lockdep.c:5144
Code: 00 00 83 3d 81 3e 3b 0e 00 75 23 90 48 c7 c7 e0 b9 ca 8b 48 c7 c6 80 bc ca 8b e8 eb e3 e5 ff 48 ba 00 00 00 00 00 fc ff df 90 <0f> 0b 90 90 90 31 db 48 81 c3 c4 00 00 00 48 89 d8 48 c1 e8 03 0f
RSP: 0018:ffffc9000347f590 EFLAGS: 00010046
RAX: 05742692f5fa7200 RBX: 0000000000000881 RCX: ffff88807e1fbc00
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000005 R08: ffffffff81586802 R09: 1ffff1101728519a
R10: dffffc0000000000 R11: ffffed101728519b R12: ffff88807e1fc728
R13: ffff88807e1fc6d8 R14: ffff88807e1fc6d8 R15: ffff88807e1fbc00
FS: 00007fcda487d6c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055ba9bc07131 CR3: 000000006858c000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5817
touch_wq_lockdep_map kernel/workqueue.c:3895 [inline]
__flush_workqueue+0x1c9/0x1710 kernel/workqueue.c:3937
gfs2_fill_super+0x1298/0x2530 fs/gfs2/ops_fstype.c:1311
get_tree_bdev+0x3f7/0x570 fs/super.c:1615
gfs2_get_tree+0x54/0x220 fs/gfs2/ops_fstype.c:1331
vfs_get_tree+0x90/0x2a0 fs/super.c:1780
do_new_mount+0x2be/0xb40 fs/namespace.c:3352
do_mount fs/namespace.c:3692 [inline]
__do_sys_mount fs/namespace.c:3898 [inline]
__se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3875
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fcda3a7e5ea
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fcda487cef8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fcda487cf80 RCX: 00007fcda3a7e5ea
RDX: 0000000020000000 RSI: 00000000200001c0 RDI: 00007fcda487cf40
RBP: 0000000020000000 R08: 00007fcda487cf80 R09: 0000000000008c1b
R10: 0000000000008c1b R11: 0000000000000246 R12: 00000000200001c0
R13: 00007fcda487cf40 R14: 000000000001279b R15: 0000000020000040
</TASK>


Tested on:

commit: 9d99040b Add linux-next specific files for 20240529
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
console output: https://syzkaller.appspot.com/x/log.txt?x=15541096980000
kernel config: https://syzkaller.appspot.com/x/.config?x=735e953fee00ec19
dashboard link: https://syzkaller.appspot.com/bug?extid=ee157488ade46c021ef4
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch: https://syzkaller.appspot.com/x/patch.diff?x=16a4bfd6980000

Reply all
Reply to author
Forward
0 new messages