syzbot


possible deadlock in reiserfs_ioctl

Status: auto-obsoleted due to no activity on 2024/03/15 17:18
Subsystems: reiserfs
[Documentation on labels]
Reported-by: syzbot+79c303ad05f4041e0dad@syzkaller.appspotmail.com
First crash: 623d, last: 202d
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 (10)
Title Replies (including bot) Last reply
[syzbot] possible deadlock in reiserfs_ioctl 0 (2) 2024/02/22 10:55
[syzbot] Monthly reiserfs report (Jan 2024) 0 (1) 2024/01/04 12:37
[syzbot] Monthly reiserfs report (Dec 2023) 0 (1) 2023/12/04 12:39
[syzbot] Monthly reiserfs report (Nov 2023) 0 (1) 2023/11/03 10:22
[syzbot] Monthly reiserfs report (Aug 2023) 0 (1) 2023/08/30 09:54
[syzbot] Monthly reiserfs report (Jul 2023) 0 (1) 2023/07/30 13:16
[syzbot] Monthly reiserfs report (Jun 2023) 0 (1) 2023/06/29 08:54
[syzbot] Monthly reiserfs report (May 2023) 0 (1) 2023/05/29 08:47
[syzbot] Monthly reiserfs report (Apr 2023) 0 (1) 2023/04/27 10:49
[syzbot] Monthly reiserfs report 0 (1) 2023/03/27 11:03
Last patch testing requests (10)
Created Duration User Patch Repo Result
2024/01/21 15:13 23m retest repro linux-next OK log
2024/01/21 15:13 23m retest repro linux-next OK log
2024/01/21 15:13 20m retest repro upstream OK log
2024/01/21 15:13 22m retest repro upstream OK log
2024/01/21 15:13 23m retest repro linux-next OK log
2024/01/21 05:14 22m retest repro upstream OK log
2024/01/20 03:05 20m retest repro upstream OK log
2024/01/20 03:05 19m retest repro upstream OK log
2024/01/20 03:05 19m retest repro upstream OK log
2024/01/20 03:05 19m retest repro upstream OK log

Sample crash report:
REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage.
======================================================
WARNING: possible circular locking dependency detected
6.7.0-rc8-syzkaller-00119-g1f874787ed9a #0 Not tainted
------------------------------------------------------
syz-executor168/5071 is trying to acquire lock:
ffff88801833e418 (sb_writers#9){.+.+}-{0:0}, at: reiserfs_ioctl+0x194/0x2e0 fs/reiserfs/ioctl.c:103

but task is already holding lock:
ffff888065472090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x79/0x100 fs/reiserfs/lock.c:27

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&sbi->lock){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x175/0x9d0 kernel/locking/mutex.c:747
       reiserfs_write_lock+0x79/0x100 fs/reiserfs/lock.c:27
       reiserfs_lookup+0x184/0x690 fs/reiserfs/namei.c:364
       __lookup_slow+0x24d/0x450 fs/namei.c:1694
       lookup_one_len+0x17d/0x1b0 fs/namei.c:2746
       reiserfs_lookup_privroot+0x94/0x200 fs/reiserfs/xattr.c:977
       reiserfs_fill_super+0x20f9/0x3160 fs/reiserfs/super.c:2174
       mount_bdev+0x1f3/0x2e0 fs/super.c:1650
       legacy_get_tree+0x109/0x220 fs/fs_context.c:662
       vfs_get_tree+0x8c/0x370 fs/super.c:1771
       do_new_mount fs/namespace.c:3337 [inline]
       path_mount+0x1492/0x1ed0 fs/namespace.c:3664
       do_mount fs/namespace.c:3677 [inline]
       __do_sys_mount fs/namespace.c:3886 [inline]
       __se_sys_mount fs/namespace.c:3863 [inline]
       __x64_sys_mount+0x293/0x310 fs/namespace.c:3863
       do_syscall_x64 arch/x86/entry/common.c:52 [inline]
       do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83
       entry_SYSCALL_64_after_hwframe+0x63/0x6b

-> #1 (&type->i_mutex_dir_key#6){+.+.}-{3:3}:
       down_write+0x3a/0x50 kernel/locking/rwsem.c:1579
       inode_lock include/linux/fs.h:802 [inline]
       open_last_lookups fs/namei.c:3543 [inline]
       path_openat+0x8bd/0x2c50 fs/namei.c:3776
       do_filp_open+0x1de/0x430 fs/namei.c:3809
       do_sys_openat2+0x176/0x1e0 fs/open.c:1437
       do_sys_open fs/open.c:1452 [inline]
       __do_sys_openat fs/open.c:1468 [inline]
       __se_sys_openat fs/open.c:1463 [inline]
       __x64_sys_openat+0x175/0x210 fs/open.c:1463
       do_syscall_x64 arch/x86/entry/common.c:52 [inline]
       do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83
       entry_SYSCALL_64_after_hwframe+0x63/0x6b

-> #0 (sb_writers#9){.+.+}-{0:0}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3869 [inline]
       __lock_acquire+0x2433/0x3b20 kernel/locking/lockdep.c:5137
       lock_acquire kernel/locking/lockdep.c:5754 [inline]
       lock_acquire+0x1ae/0x520 kernel/locking/lockdep.c:5719
       percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
       __sb_start_write include/linux/fs.h:1635 [inline]
       sb_start_write include/linux/fs.h:1710 [inline]
       mnt_want_write_file+0x98/0x600 fs/namespace.c:448
       reiserfs_ioctl+0x194/0x2e0 fs/reiserfs/ioctl.c:103
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:871 [inline]
       __se_sys_ioctl fs/ioctl.c:857 [inline]
       __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
       do_syscall_x64 arch/x86/entry/common.c:52 [inline]
       do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83
       entry_SYSCALL_64_after_hwframe+0x63/0x6b

other info that might help us debug this:

Chain exists of:
  sb_writers#9 --> &type->i_mutex_dir_key#6 --> &sbi->lock

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&sbi->lock);
                               lock(&type->i_mutex_dir_key#6);
                               lock(&sbi->lock);
  rlock(sb_writers#9);

 *** DEADLOCK ***

1 lock held by syz-executor168/5071:
 #0: ffff888065472090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x79/0x100 fs/reiserfs/lock.c:27

stack backtrace:
CPU: 0 PID: 5071 Comm: syz-executor168 Not tainted 6.7.0-rc8-syzkaller-00119-g1f874787ed9a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
 check_noncircular+0x317/0x400 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 kernel/locking/lockdep.c:3869 [inline]
 __lock_acquire+0x2433/0x3b20 kernel/locking/lockdep.c:5137
 lock_acquire kernel/locking/lockdep.c:5754 [inline]
 lock_acquire+0x1ae/0x520 kernel/locking/lockdep.c:5719
 percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
 __sb_start_write include/linux/fs.h:1635 [inline]
 sb_start_write include/linux/fs.h:1710 [inline]
 mnt_want_write_file+0x98/0x600 fs/namespace.c:448
 reiserfs_ioctl+0x194/0x2e0 fs/reiserfs/ioctl.c:103
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:871 [inline]
 __se_sys_ioctl fs/ioctl.c:857 [inline]
 __x64_sys_ioctl+0x18f/0x210 fs/ioctl.c:857
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f0cb0ca0639
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe08910fb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffe08911188 RCX: 00007f0cb0ca0639
RDX: 0000000000000000 RSI: 0000000040087602 RDI: 0000000000000004
RBP: 00007f0cb0d14610 R08: 0000000000000000 R09: 00007ffe08911188
R10: 0000000000001111 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffe08911178 R14: 0000000000000001 R15: 0000000000000001
 </TA

Crashes (441):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/01/05 17:17 upstream 1f874787ed9a 28c42cff .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-badwrites-root possible deadlock in reiserfs_ioctl
2023/12/28 21:30 upstream f5837722ffec fb427a07 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/26 20:03 upstream fbafc3e621c3 fb427a07 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/24 10:32 upstream 3f82f1c3a036 fb427a07 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/08 07:45 upstream 9ace34a8e446 28b24332 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root possible deadlock in reiserfs_ioctl
2023/06/13 07:52 upstream fd37b884003c 749afb64 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-selinux-root possible deadlock in reiserfs_ioctl
2023/02/22 21:47 upstream 5b7c4cabbb65 409945bc .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2022/12/11 05:53 upstream 296a7b7eb792 67be1ae7 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/09/23 01:41 linux-next 940fcc189c51 0b6a67ac .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/03/23 10:09 linux-next 0aa250ce67a2 f94b4a29 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root possible deadlock in reiserfs_ioctl
2022/11/10 13:06 linux-next 0cdb3579f1ee b2488a87 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root possible deadlock in reiserfs_ioctl
2024/01/03 10:02 upstream 610a9b8f49fb fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in reiserfs_ioctl
2024/01/03 08:36 upstream 610a9b8f49fb fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/31 19:57 upstream 453f5db0619e fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in reiserfs_ioctl
2023/12/30 19:29 upstream f016f7547aee fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in reiserfs_ioctl
2023/12/29 08:14 upstream 505e701c0b2c fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/27 14:33 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/27 07:02 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/26 19:08 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/26 00:20 upstream 861deac3b092 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in reiserfs_ioctl
2023/12/19 14:24 upstream 2cf4f94d8e86 3ad490ea .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in reiserfs_ioctl
2023/12/16 10:49 upstream 3bd7d7488169 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in reiserfs_ioctl
2023/12/13 10:50 upstream eaadbbaaff74 ebcad15c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in reiserfs_ioctl
2023/12/09 18:37 upstream f2e8a57ee903 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in reiserfs_ioctl
2023/12/08 20:23 upstream 5e3f5b81de80 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/08 06:53 upstream 9ace34a8e446 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in reiserfs_ioctl
2023/12/08 02:24 upstream 9ace34a8e446 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/07 21:25 upstream bee0e7762ad2 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/06 07:38 upstream bee0e7762ad2 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in reiserfs_ioctl
2023/12/06 06:28 upstream bee0e7762ad2 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/06 04:48 upstream bee0e7762ad2 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in reiserfs_ioctl
2023/12/05 23:50 upstream bee0e7762ad2 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in reiserfs_ioctl
2023/12/04 14:21 upstream 33cc938e65a9 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/03 18:31 upstream 33cc938e65a9 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/02 22:36 upstream 815fb87b7530 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/02 17:23 upstream 815fb87b7530 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/01 22:14 upstream 994d5c58e50e f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in reiserfs_ioctl
2023/11/27 14:24 upstream 2cc14f52aeb7 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in reiserfs_ioctl
2023/12/29 20:51 upstream 8735c7c84d1b fb427a07 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in reiserfs_ioctl
2023/12/25 23:03 upstream 861deac3b092 fb427a07 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in reiserfs_ioctl
2023/12/25 07:12 upstream 861deac3b092 fb427a07 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in reiserfs_ioctl
2023/12/23 02:53 upstream 8afe6f0e0e25 fb427a07 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in reiserfs_ioctl
2023/12/22 20:10 upstream 8afe6f0e0e25 fb427a07 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in reiserfs_ioctl
2023/12/19 01:28 upstream 2cf4f94d8e86 924661f4 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in reiserfs_ioctl
2023/12/18 15:50 upstream ceb6a6f023fd 3222d10c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in reiserfs_ioctl
2023/12/17 23:23 upstream 0e389834672c 3222d10c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in reiserfs_ioctl
2023/12/06 18:25 upstream bee0e7762ad2 95293603 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in reiserfs_ioctl
2023/12/06 09:14 upstream bee0e7762ad2 858d62d1 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in reiserfs_ioctl
2023/12/02 10:14 upstream 815fb87b7530 f819d6f7 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in reiserfs_ioctl
2023/12/01 10:23 upstream 6172a5180fcc f819d6f7 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in reiserfs_ioctl
2023/11/29 07:22 upstream 18d46e76d7c2 1adfb6f6 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in reiserfs_ioctl
2023/11/27 18:44 upstream 2cc14f52aeb7 7ec6c044 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in reiserfs_ioctl
2023/11/27 10:07 upstream 2cc14f52aeb7 5b429f39 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream possible deadlock in reiserfs_ioctl
2023/12/19 07:51 upstream 2cf4f94d8e86 3ad490ea .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in reiserfs_ioctl
2023/12/10 14:33 upstream c527f5606aa5 28b24332 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in reiserfs_ioctl
2023/11/27 21:52 upstream 2cc14f52aeb7 7ec6c044 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in reiserfs_ioctl
2023/11/06 23:58 linux-next e27090b1413f 78fae24e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in reiserfs_ioctl
* Struck through repros no longer work on HEAD.