syzbot


BUG: sleeping function called from invalid context in gfs2_withdraw

Status: fixed on 2024/03/20 11:33
Subsystems: gfs2
[Documentation on labels]
Reported-by: syzbot+577d06779fa95206ba66@syzkaller.appspotmail.com
Fix commit: 6f861765464f fs: Block writes to mounted block devices
First crash: 234d, last: 109d
Cause bisection: failed (error log, bisect log)
  
Fix bisection: fixed by (bisect log) :
commit 6f861765464f43a71462d52026fbddfc858239a5
Author: Jan Kara <jack@suse.cz>
Date: Wed Nov 1 17:43:10 2023 +0000

  fs: Block writes to mounted block devices

  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [gfs2?] BUG: sleeping function called from invalid context in gfs2_withdraw 1 (3) 2024/03/05 10:07
[syzbot] Monthly gfs2 report (Oct 2023) 0 (1) 2023/10/05 13:58
Last patch testing requests (5)
Created Duration User Patch Repo Result
2024/03/02 19:18 37m retest repro upstream OK log
2023/12/23 18:53 16m retest repro upstream report log
2023/10/10 08:55 35m retest repro upstream report log
2023/10/10 01:52 21m retest repro upstream report log
2023/10/03 18:18 18m yuran.pereira@hotmail.com https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ master report log
Fix bisection attempts (4)
Created Duration User Patch Repo Result
2024/03/05 01:42 8h05m bisect fix upstream job log (1)
2024/01/08 18:33 1h29m bisect fix upstream job log (0) log
2023/12/09 17:08 1h23m bisect fix upstream job log (0) log
2023/11/09 15:14 1h53m bisect fix upstream job log (0) log
Cause bisection attempts (2)
Created Duration User Patch Repo Result
2023/10/05 06:09 12h06m bisect upstream error job log (0)
2023/09/27 14:14 8h58m bisect upstream error job log (0)

Sample crash report:
syz-executor110: attempt to access beyond end of device
loop0: rw=1, sector=131324, nr_sectors = 4 limit=32768
gfs2: fsid=syz:syz.0: Error 10 writing to journal, jid=0
gfs2: fsid=syz:syz.0: fatal: I/O error(s)
gfs2: fsid=syz:syz.0: about to withdraw this file system
BUG: sleeping function called from invalid context at fs/gfs2/util.c:157
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5035, name: syz-executor110
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
5 locks held by syz-executor110/5035:
 #0: ffff888078fe40e0 (&type->s_umount_key#61){+.+.}-{3:3}, at: __super_lock fs/super.c:56 [inline]
 #0: ffff888078fe40e0 (&type->s_umount_key#61){+.+.}-{3:3}, at: __super_lock_excl fs/super.c:71 [inline]
 #0: ffff888078fe40e0 (&type->s_umount_key#61){+.+.}-{3:3}, at: deactivate_super+0xd6/0x100 fs/super.c:513
 #1: ffff88802b5a4b78 (&sdp->sd_quota_sync_mutex){+.+.}-{3:3}, at: gfs2_quota_sync+0x19e/0x630 fs/gfs2/quota.c:1331
 #2: ffff88802b5a5060 (&sdp->sd_log_flush_lock){++++}-{3:3}, at: gfs2_log_flush+0xe4/0x27f0 fs/gfs2/log.c:1042
 #3: ffff88802b5a4e88 (&sdp->sd_log_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
 #3: ffff88802b5a4e88 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline]
 #3: ffff88802b5a4e88 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_flush_revokes+0x60/0x90 fs/gfs2/log.c:814
 #4: ffff88802b5a5248 (&sdp->sd_freeze_mutex){+.+.}-{3:3}, at: signal_our_withdraw fs/gfs2/util.c:152 [inline]
 #4: ffff88802b5a5248 (&sdp->sd_freeze_mutex){+.+.}-{3:3}, at: gfs2_withdraw+0xc38/0x1280 fs/gfs2/util.c:342
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 1 PID: 5035 Comm: syz-executor110 Not tainted 6.6.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x125/0x1b0 lib/dump_stack.c:106
 __might_resched+0x3c3/0x5e0 kernel/sched/core.c:10187
 signal_our_withdraw fs/gfs2/util.c:157 [inline]
 gfs2_withdraw+0xc7d/0x1280 fs/gfs2/util.c:342
 gfs2_ail1_empty+0x8cc/0xab0 fs/gfs2/log.c:377
 gfs2_flush_revokes+0x6b/0x90 fs/gfs2/log.c:815
 revoke_lo_before_commit+0x22/0x640 fs/gfs2/lops.c:867
 lops_before_commit fs/gfs2/lops.h:40 [inline]
 gfs2_log_flush+0x105e/0x27f0 fs/gfs2/log.c:1101
 do_sync+0x550/0xd30 fs/gfs2/quota.c:985
 gfs2_quota_sync+0x419/0x630 fs/gfs2/quota.c:1347
 gfs2_sync_fs+0x44/0xb0 fs/gfs2/super.c:667
 sync_filesystem fs/sync.c:56 [inline]
 sync_filesystem+0x109/0x280 fs/sync.c:30
 generic_shutdown_super+0x7e/0x3c0 fs/super.c:666
 kill_block_super+0x3b/0x70 fs/super.c:1646
 gfs2_kill_sb+0x361/0x410 fs/gfs2/ops_fstype.c:1811
 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:180
 ptrace_notify+0x10c/0x130 kernel/signal.c:2387
 ptrace_report_syscall include/linux/ptrace.h:411 [inline]
 ptrace_report_syscall_exit include/linux/ptrace.h:473 [inline]
 syscall_exit_work kernel/entry/common.c:251 [inline]
 syscall_exit_to_user_mode_prepare+0x120/0x220 kernel/entry/common.c:278
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0xd/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:0x7f347240f307
Code: 09 00 48 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffdb4a6a238 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007f347240f307
RDX: 0000000000000000 RSI: 000000000000000a RDI: 00007ffdb4a6a2f0
RBP: 00007ffdb4a6a2f0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000202 R12: 00007ffdb4a6b350
R13: 00005555565a36c0 R14: 0000000000000001 R15: 431bde82d7b634db
 </TASK>
BUG: scheduling while atomic: syz-executor110/5035/0x00000002
5 locks held by syz-executor110/5035:
 #0: ffff888078fe40e0 (&type->s_umount_key#61){+.+.}-{3:3}, at: __super_lock fs/super.c:56 [inline]
 #0: ffff888078fe40e0 (&type->s_umount_key#61){+.+.}-{3:3}, at: __super_lock_excl fs/super.c:71 [inline]
 #0: ffff888078fe40e0 (&type->s_umount_key#61){+.+.}-{3:3}, at: deactivate_super+0xd6/0x100 fs/super.c:513
 #1: ffff88802b5a4b78 (&sdp->sd_quota_sync_mutex){+.+.}-{3:3}, at: gfs2_quota_sync+0x19e/0x630 fs/gfs2/quota.c:1331
 #2: ffff88802b5a5060 (&sdp->sd_log_flush_lock){++++}-{3:3}, at: gfs2_log_flush+0xe4/0x27f0 fs/gfs2/log.c:1042
 #3: ffff88802b5a4e88 (&sdp->sd_log_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
 #3: ffff88802b5a4e88 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_log_lock fs/gfs2/log.h:32 [inline]
 #3: ffff88802b5a4e88 (&sdp->sd_log_lock){+.+.}-{2:2}, at: gfs2_flush_revokes+0x60/0x90 fs/gfs2/log.c:814
 #4: ffff88802b5a5248 (&sdp->sd_freeze_mutex){+.+.}-{3:3}, at: signal_our_withdraw fs/gfs2/util.c:152 [inline]
 #4: ffff88802b5a5248 (&sdp->sd_freeze_mutex){+.+.}-{3:3}, at: gfs2_withdraw+0xc38/0x1280 fs/gfs2/util.c:342
Modules linked in:
Preemption disabled at:
[<0000000000000000>] 0x0

Crashes (182):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/26 01:41 upstream 6465e260f487 0b6a67ac .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/06 09:15 upstream 65d6e954e378 0b6286dc .config console log report syz C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/14 23:34 upstream aed8aee11130 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/14 11:39 upstream aed8aee11130 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/14 09:29 upstream 23f108dc9ed2 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/13 16:40 upstream 3669558bdf35 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/12 06:16 upstream 0bb80ecc33a8 59da8366 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/12 02:37 upstream 0bb80ecc33a8 59da8366 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/12 01:19 upstream 0bb80ecc33a8 59da8366 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/11 09:38 upstream 0bb80ecc33a8 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/11 06:05 upstream 0bb80ecc33a8 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/10 16:46 upstream 535a265d7f0d 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/10 03:54 upstream 2a5a4326e583 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/09 18:02 upstream 6099776f9f26 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/09 02:46 upstream ca9c7abf9502 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/08 22:24 upstream a48fa7efaf11 6654cf89 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/08 07:43 upstream 4a0fc73da97e 72324844 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/16 06:40 upstream e42bebf6db29 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/16 06:19 upstream e42bebf6db29 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/15 21:53 upstream e42bebf6db29 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/15 13:35 upstream 9fdfb15a3dbf 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/15 08:53 upstream 9fdfb15a3dbf 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/14 21:01 upstream aed8aee11130 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/14 16:23 upstream aed8aee11130 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/13 19:56 upstream 3669558bdf35 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/13 14:29 upstream 3669558bdf35 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/13 03:03 upstream a747acc0b752 59da8366 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/12 07:31 upstream 0bb80ecc33a8 59da8366 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/12 05:29 upstream 0bb80ecc33a8 59da8366 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/11 06:35 upstream e56b2b605799 6654cf89 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/10 17:53 upstream 535a265d7f0d 6654cf89 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/10 06:06 upstream 535a265d7f0d 6654cf89 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/10 01:25 upstream 6099776f9f26 6654cf89 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/09 22:13 upstream 6099776f9f26 6654cf89 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/08 22:39 upstream a48fa7efaf11 019310ab .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/08 22:20 upstream a48fa7efaf11 019310ab .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/08 22:18 upstream a48fa7efaf11 019310ab .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/08 22:11 upstream a48fa7efaf11 019310ab .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/08 06:55 upstream ff6e6ded5472 72324844 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/08 06:33 upstream ff6e6ded5472 72324844 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/15 14:49 upstream 9fdfb15a3dbf 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/15 02:42 upstream 9fdfb15a3dbf 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/15 02:35 upstream 9fdfb15a3dbf 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/14 16:23 upstream aed8aee11130 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/14 02:03 upstream 23f108dc9ed2 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/13 10:53 upstream 3669558bdf35 0b6a67ac .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/12 13:05 upstream 0bb80ecc33a8 59da8366 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/10 07:14 upstream 535a265d7f0d 6654cf89 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/08 07:03 upstream ff6e6ded5472 72324844 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/08 06:38 upstream ff6e6ded5472 72324844 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 BUG: sleeping function called from invalid context in gfs2_withdraw
2023/09/06 14:38 linux-next 66d957319396 8bc9053e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in gfs2_withdraw
* Struck through repros no longer work on HEAD.