XFS (loop0): Unmounting Filesystem REISERFS (device loop4): Using r5 hash to sort names REISERFS (device loop4): Created .reiserfs_priv - reserved for xattr storage. ====================================================== WARNING: possible circular locking dependency detected 4.14.302-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.4/9752 is trying to acquire lock: (sb_writers#14){.+.+}, at: [] sb_start_write include/linux/fs.h:1551 [inline] (sb_writers#14){.+.+}, at: [] mnt_want_write_file+0xfd/0x3b0 fs/namespace.c:497 but task is already holding lock: (&sbi->lock){+.+.}, at: [] reiserfs_write_lock+0x75/0xf0 fs/reiserfs/lock.c:27 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&sbi->lock){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0xc4/0x1310 kernel/locking/mutex.c:893 reiserfs_write_lock+0x75/0xf0 fs/reiserfs/lock.c:27 reiserfs_dirty_inode+0xa8/0x200 fs/reiserfs/super.c:710 __mark_inode_dirty+0x11e/0xf40 fs/fs-writeback.c:2134 generic_update_time+0x1b0/0x270 fs/inode.c:1657 update_time fs/inode.c:1673 [inline] touch_atime+0x1ed/0x250 fs/inode.c:1745 file_accessed include/linux/fs.h:2077 [inline] iterate_dir+0x4c5/0x5e0 fs/readdir.c:57 SYSC_getdents64 fs/readdir.c:358 [inline] SyS_getdents64+0x125/0x230 fs/readdir.c:339 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 -> #0 (sb_writers#14){.+.+}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x64/0x260 fs/super.c:1342 sb_start_write include/linux/fs.h:1551 [inline] mnt_want_write_file+0xfd/0x3b0 fs/namespace.c:497 reiserfs_ioctl+0x18e/0x8b0 fs/reiserfs/ioctl.c:110 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sbi->lock); lock(sb_writers#14); lock(&sbi->lock); lock(sb_writers#14); *** DEADLOCK *** 1 lock held by syz-executor.4/9752: #0: (&sbi->lock){+.+.}, at: [] reiserfs_write_lock+0x75/0xf0 fs/reiserfs/lock.c:27 stack backtrace: CPU: 1 PID: 9752 Comm: syz-executor.4 Not tainted 4.14.302-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] __sb_start_write+0x64/0x260 fs/super.c:1342 sb_start_write include/linux/fs.h:1551 [inline] mnt_want_write_file+0xfd/0x3b0 fs/namespace.c:497 reiserfs_ioctl+0x18e/0x8b0 fs/reiserfs/ioctl.c:110 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x5e/0xd3 RIP: 0033:0x7f6a531a00d9 RSP: 002b:00007f6a51712168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f6a532bff80 RCX: 00007f6a531a00d9 RDX: 00000000200000c0 RSI: 0000000040087602 RDI: 0000000000000005 RBP: 00007f6a531fbae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe5f646cdf R14: 00007f6a51712300 R15: 0000000000022000 kauditd_printk_skb: 9 callbacks suppressed audit: type=1804 audit(1671576397.422:21): pid=9847 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir3585461828/syzkaller.ftDKQd/13/memory.events" dev="sda1" ino=13911 res=1 audit: type=1800 audit(1671576397.452:22): pid=9847 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="memory.events" dev="sda1" ino=13911 res=0 audit: type=1804 audit(1671576398.052:23): pid=9903 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir3585461828/syzkaller.ftDKQd/14/memory.events" dev="sda1" ino=13887 res=1 audit: type=1800 audit(1671576398.052:24): pid=9903 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="memory.events" dev="sda1" ino=13887 res=0 xt_CT: netfilter: NOTRACK target is deprecated, use CT instead or upgrade iptables Cannot find set identified by id 0 to match Cannot find set identified by id 0 to match Cannot find set identified by id 0 to match Cannot find set identified by id 0 to match