ci starts bisection 2023-01-30 03:49:51.645367958 +0000 UTC m=+635905.591430025 bisecting fixing commit since b6e7fdfd6f6a8bf88fcdb4a45da52c42ba238c25 building syzkaller on 5bb7001449cd1dae6cbff2d660374d6d17cbd2c4 ensuring issue is reproducible on original commit b6e7fdfd6f6a8bf88fcdb4a45da52c42ba238c25 testing commit b6e7fdfd6f6a8bf88fcdb4a45da52c42ba238c25 gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: c48eba9f96c042ea562e2288a4f1b9df9f9b50110b314391f6aeef85f6db9364 all runs: crashed: possible deadlock in do_journal_begin_r testing current HEAD 22b8077d0fcec86c6ed0e0fce9f7e7e5a4c2d56a testing commit 22b8077d0fcec86c6ed0e0fce9f7e7e5a4c2d56a gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 8bb5a5f419f7b54c5581630cae7a6b8cdad7020debd008238aa5bcfa4de5dae0 all runs: crashed: possible deadlock in do_journal_begin_r revisions tested: 2, total time: 25m10.214950383s (build: 18m14.222006626s, test: 6m7.695916189s) the crash still happens on HEAD commit msg: Merge tag 'fscache-fixes-20230130' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs crash: possible deadlock in do_journal_begin_r REISERFS (device loop0): checking transaction log (loop0) REISERFS (device loop0): Using rupasov hash to sort names REISERFS (device loop0): Created .reiserfs_priv - reserved for xattr storage. ====================================================== WARNING: possible circular locking dependency detected 6.2.0-rc6-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/5610 is trying to acquire lock: ffffc900049310f0 (&journal->j_mutex){+.+.}-{3:3}, at: reiserfs_mutex_lock_safe fs/reiserfs/reiserfs.h:814 [inline] ffffc900049310f0 (&journal->j_mutex){+.+.}-{3:3}, at: lock_journal fs/reiserfs/journal.c:534 [inline] ffffc900049310f0 (&journal->j_mutex){+.+.}-{3:3}, at: do_journal_begin_r+0x273/0xee0 fs/reiserfs/journal.c:3047 but task is already holding lock: ffff88802710e460 (sb_writers#13){.+.+}-{0:0}, at: reiserfs_ioctl+0x136/0x290 fs/reiserfs/ioctl.c:103 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (sb_writers#13){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write include/linux/fs.h:1814 [inline] sb_start_write include/linux/fs.h:1889 [inline] mnt_want_write_file+0x8f/0x480 fs/namespace.c:552 reiserfs_ioctl+0x136/0x290 fs/reiserfs/ioctl.c:103 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x123/0x190 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #1 (&sbi->lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x12f/0x1360 kernel/locking/mutex.c:747 reiserfs_write_lock_nested+0x4f/0xc0 fs/reiserfs/lock.c:78 reiserfs_mutex_lock_safe fs/reiserfs/reiserfs.h:815 [inline] lock_journal fs/reiserfs/journal.c:534 [inline] do_journal_begin_r+0x27d/0xee0 fs/reiserfs/journal.c:3047 journal_begin+0x151/0x3a0 fs/reiserfs/journal.c:3255 reiserfs_fill_super+0x1740/0x26a0 fs/reiserfs/super.c:2104 mount_bdev+0x2cf/0x3b0 fs/super.c:1359 legacy_get_tree+0xfe/0x1f0 fs/fs_context.c:610 vfs_get_tree+0x83/0x2c0 fs/super.c:1489 do_new_mount fs/namespace.c:3145 [inline] path_mount+0x810/0x1a10 fs/namespace.c:3475 do_mount fs/namespace.c:3488 [inline] __do_sys_mount fs/namespace.c:3697 [inline] __se_sys_mount fs/namespace.c:3674 [inline] __x64_sys_mount+0x1f9/0x270 fs/namespace.c:3674 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #0 (&journal->j_mutex){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3097 [inline] check_prevs_add kernel/locking/lockdep.c:3216 [inline] validate_chain kernel/locking/lockdep.c:3831 [inline] __lock_acquire+0x2a43/0x56d0 kernel/locking/lockdep.c:5055 lock_acquire kernel/locking/lockdep.c:5668 [inline] lock_acquire+0x1e3/0x630 kernel/locking/lockdep.c:5633 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x12f/0x1360 kernel/locking/mutex.c:747 reiserfs_mutex_lock_safe fs/reiserfs/reiserfs.h:814 [inline] lock_journal fs/reiserfs/journal.c:534 [inline] do_journal_begin_r+0x273/0xee0 fs/reiserfs/journal.c:3047 journal_begin+0x151/0x3a0 fs/reiserfs/journal.c:3255 reiserfs_dirty_inode+0xe8/0x220 fs/reiserfs/super.c:710 __mark_inode_dirty+0x1ad/0xd70 fs/fs-writeback.c:2419 mark_inode_dirty include/linux/fs.h:2465 [inline] reiserfs_ioctl+0x1d8/0x290 fs/reiserfs/ioctl.c:111 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x123/0x190 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd other info that might help us debug this: Chain exists of: &journal->j_mutex --> &sbi->lock --> sb_writers#13 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_writers#13); lock(&sbi->lock); lock(sb_writers#13); lock(&journal->j_mutex); *** DEADLOCK *** 1 lock held by syz-executor.0/5610: #0: ffff88802710e460 (sb_writers#13){.+.+}-{0:0}, at: reiserfs_ioctl+0x136/0x290 fs/reiserfs/ioctl.c:103 stack backtrace: CPU: 0 PID: 5610 Comm: syz-executor.0 Not tainted 6.2.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x5b/0x81 lib/dump_stack.c:106 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2177 check_prev_add kernel/locking/lockdep.c:3097 [inline] check_prevs_add kernel/locking/lockdep.c:3216 [inline] validate_chain kernel/locking/lockdep.c:3831 [inline] __lock_acquire+0x2a43/0x56d0 kernel/locking/lockdep.c:5055 lock_acquire kernel/locking/lockdep.c:5668 [inline] lock_acquire+0x1e3/0x630 kernel/locking/lockdep.c:5633 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x12f/0x1360 kernel/locking/mutex.c:747 reiserfs_mutex_lock_safe fs/reiserfs/reiserfs.h:814 [inline] lock_journal fs/reiserfs/journal.c:534 [inline] do_journal_begin_r+0x273/0xee0 fs/reiserfs/journal.c:3047 journal_begin+0x151/0x3a0 fs/reiserfs/journal.c:3255 reiserfs_dirty_inode+0xe8/0x220 fs/reiserfs/super.c:710 __mark_inode_dirty+0x1ad/0xd70 fs/fs-writeback.c:2419 mark_inode_dirty include/linux/fs.h:2465 [inline] reiserfs_ioctl+0x1d8/0x290 fs/reiserfs/ioctl.c:111 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x123/0x190 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fcb1e88b639 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fcb1dbfe168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fcb1e9abf80 RCX: 00007fcb1e88b639 RDX: 0000000020000080 RSI: 0000000040087602 RDI: 0000000000000005 RBP: 00007fcb1e8e6ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffec7b866df R14: 00007fcb1dbfe300 R15: 0000000000022000