syzbot


possible deadlock in do_qc

Status: auto-obsoleted due to no activity on 2024/10/22 09:11
Subsystems: gfs2
[Documentation on labels]
Reported-by: syzbot+8ef337b733667f9a7ec8@syzkaller.appspotmail.com
First crash: 248d, last: 116d
Discussions (5)
Title Replies (including bot) Last reply
[syzbot] Monthly gfs2 report (Aug 2024) 0 (1) 2024/08/02 07:26
[syzbot] Monthly gfs2 report (Jul 2024) 0 (1) 2024/07/01 10:27
[syzbot] Monthly gfs2 report (May 2024) 0 (1) 2024/05/31 06:48
[syzbot] Monthly gfs2 report (Apr 2024) 0 (1) 2024/04/29 12:34
[syzbot] [gfs2?] possible deadlock in do_qc 0 (1) 2024/04/07 05:18
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 possible deadlock in do_qc 404 3h07m 223d 0/3 upstream: reported on 2024/04/27 22:18
linux-6.1 possible deadlock in do_qc 220 13h27m 223d 0/3 upstream: reported on 2024/04/28 01:25

Sample crash report:
gfs2: fsid=syz:syz.0: found 1 quota changes
======================================================
WARNING: possible circular locking dependency detected
6.10.0-syzkaller #0 Not tainted
------------------------------------------------------
syz.5.1603/11746 is trying to acquire lock:
ffff888046b24ae8 (&sdp->sd_quota_mutex){+.+.}-{3:3}, at: do_qc+0xaa/0x670 fs/gfs2/quota.c:720

but task is already holding lock:
ffff88805ee9d688 (&ip->i_rw_mutex){++++}-{3:3}, at: sweep_bh_for_rgrps fs/gfs2/bmap.c:1529 [inline]
ffff88805ee9d688 (&ip->i_rw_mutex){++++}-{3:3}, at: punch_hole+0x271c/0x39c0 fs/gfs2/bmap.c:1853

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&ip->i_rw_mutex){++++}-{3:3}:
       lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754
       down_read+0xb1/0xa40 kernel/locking/rwsem.c:1526
       __gfs2_iomap_get+0x17e/0x1480 fs/gfs2/bmap.c:859
       gfs2_iomap_get+0xdf/0x160 fs/gfs2/bmap.c:1413
       bh_get+0x26a/0x7e0 fs/gfs2/quota.c:417
       qdsb_get+0x218/0x340 fs/gfs2/quota.c:566
       gfs2_quota_hold+0x1a1/0x5d0 fs/gfs2/quota.c:646
       punch_hole+0xe9d/0x39c0 fs/gfs2/bmap.c:1814
       __gfs2_punch_hole+0x87f/0xb30 fs/gfs2/bmap.c:2460
       gfs2_fallocate+0x3a4/0x490 fs/gfs2/file.c:1399
       vfs_fallocate+0x566/0x6c0 fs/open.c:330
       ksys_fallocate fs/open.c:353 [inline]
       __do_sys_fallocate fs/open.c:361 [inline]
       __se_sys_fallocate fs/open.c:359 [inline]
       __x64_sys_fallocate+0xbd/0x110 fs/open.c:359
       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

-> #0 (&sdp->sd_quota_mutex){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3869
       __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
       lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754
       __mutex_lock_common kernel/locking/mutex.c:608 [inline]
       __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
       do_qc+0xaa/0x670 fs/gfs2/quota.c:720
       gfs2_quota_change+0x2e2/0x8d0 fs/gfs2/quota.c:1315
       punch_hole+0x3355/0x39c0 fs/gfs2/bmap.c:1954
       __gfs2_punch_hole+0x87f/0xb30 fs/gfs2/bmap.c:2460
       gfs2_fallocate+0x3a4/0x490 fs/gfs2/file.c:1399
       vfs_fallocate+0x566/0x6c0 fs/open.c:330
       ksys_fallocate fs/open.c:353 [inline]
       __do_sys_fallocate fs/open.c:361 [inline]
       __se_sys_fallocate fs/open.c:359 [inline]
       __x64_sys_fallocate+0xbd/0x110 fs/open.c:359
       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

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&ip->i_rw_mutex);
                               lock(&sdp->sd_quota_mutex);
                               lock(&ip->i_rw_mutex);
  lock(&sdp->sd_quota_mutex);

 *** DEADLOCK ***

5 locks held by syz.5.1603/11746:
 #0: ffff888022952420 (sb_writers#30){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2854 [inline]
 #0: ffff888022952420 (sb_writers#30){.+.+}-{0:0}, at: vfs_fallocate+0x4d3/0x6c0 fs/open.c:329
 #1: ffff88805ee9d1f0 (&sb->s_type->i_mutex_key#40){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:791 [inline]
 #1: ffff88805ee9d1f0 (&sb->s_type->i_mutex_key#40){+.+.}-{3:3}, at: gfs2_fallocate+0x19f/0x490 fs/gfs2/file.c:1380
 #2: ffff888022952610 (sb_internal#5){.+.+}-{0:0}, at: gfs2_trans_begin+0x71/0xe0 fs/gfs2/trans.c:118
 #3: ffff888046b25060 (&sdp->sd_log_flush_lock){.+.+}-{3:3}, at: __gfs2_trans_begin+0x55d/0x950 fs/gfs2/trans.c:87
 #4: ffff88805ee9d688 (&ip->i_rw_mutex){++++}-{3:3}, at: sweep_bh_for_rgrps fs/gfs2/bmap.c:1529 [inline]
 #4: ffff88805ee9d688 (&ip->i_rw_mutex){++++}-{3:3}, at: punch_hole+0x271c/0x39c0 fs/gfs2/bmap.c:1853

stack backtrace:
CPU: 0 PID: 11746 Comm: syz.5.1603 Not tainted 6.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3869
 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754
 __mutex_lock_common kernel/locking/mutex.c:608 [inline]
 __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
 do_qc+0xaa/0x670 fs/gfs2/quota.c:720
 gfs2_quota_change+0x2e2/0x8d0 fs/gfs2/quota.c:1315
 punch_hole+0x3355/0x39c0 fs/gfs2/bmap.c:1954
 __gfs2_punch_hole+0x87f/0xb30 fs/gfs2/bmap.c:2460
 gfs2_fallocate+0x3a4/0x490 fs/gfs2/file.c:1399
 vfs_fallocate+0x566/0x6c0 fs/open.c:330
 ksys_fallocate fs/open.c:353 [inline]
 __do_sys_fallocate fs/open.c:361 [inline]
 __se_sys_fallocate fs/open.c:359 [inline]
 __x64_sys_fallocate+0xbd/0x110 fs/open.c:359
 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:0x7ff28d575bd9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff28e34e048 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
RAX: ffffffffffffffda RBX: 00007ff28d703f60 RCX: 00007ff28d575bd9
RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000005
RBP: 00007ff28d5e4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000080000001 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007ff28d703f60 R15: 00007ffe01f7cdb8
 </TASK>

Crashes (785):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/15 09:54 upstream 0c3836482481 c605e6a2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in do_qc
2024/07/14 22:37 upstream 4d145e3f830b eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in do_qc
2024/07/07 12:38 upstream 22f902dfc51e bc4ebbb5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in do_qc
2024/06/17 03:29 upstream 2ccbdf43d5e7 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in do_qc
2024/05/22 06:25 upstream 8f6a15f095a6 1014eca7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in do_qc
2024/06/21 12:56 upstream 50736169ecc8 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in do_qc
2024/06/21 18:06 upstream 50736169ecc8 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in do_qc
2024/06/27 11:45 linux-next 62c97045b8f7 5c045c04 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in do_qc
2024/08/13 09:10 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 7b0f4b46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/13 04:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 7b0f4b46 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/12 14:58 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/12 13:54 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/12 07:55 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/12 05:41 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/12 02:46 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/11 16:42 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/11 15:35 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/11 14:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/11 11:39 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/11 10:29 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/11 05:13 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/11 03:03 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/10 23:51 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/10 20:28 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/10 11:13 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/10 02:23 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 a9e7e9e3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/10 00:51 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 a9e7e9e3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/09 22:20 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 a9e7e9e3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/09 11:44 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/09 09:34 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 61405512 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/08 01:01 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 7b2f2f35 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/07 10:17 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 e1bdb00a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/06 18:41 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 e1bdb00a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/06 16:15 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 e1bdb00a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/06 12:25 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 e1bdb00a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/06 02:01 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 e35c337f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/06 00:51 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 e35c337f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/05 22:32 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 e35c337f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/05 21:02 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 e35c337f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/05 09:51 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/05 08:41 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/05 06:44 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/05 03:22 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/05 02:11 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/05 00:58 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/04 23:48 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/04 20:38 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/04 17:43 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/04 15:21 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/04 10:52 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/04 04:48 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/03 23:09 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/03 21:36 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/08/03 09:57 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 53683cf2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
2024/04/03 05:08 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 707081b61156 7925100d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in do_qc
* Struck through repros no longer work on HEAD.