====================================================== WARNING: possible circular locking dependency detected 4.18.0-rc8+ #85 Not tainted ------------------------------------------------------ syz-executor1/31374 is trying to acquire lock: 00000000b9ad15de (sb_writers#17){.+.+}, at: sb_start_write include/linux/fs.h:1554 [inline] 00000000b9ad15de (sb_writers#17){.+.+}, at: mnt_want_write+0x3f/0xc0 fs/namespace.c:386 but task is already holding lock: 0000000017f082b6 (&fi->mutex){+.+.}, at: fuse_lock_inode+0xaf/0xe0 fs/fuse/inode.c:363 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&fi->mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:757 [inline] __mutex_lock+0x176/0x1820 kernel/locking/mutex.c:894 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:909 fuse_lock_inode+0xaf/0xe0 fs/fuse/inode.c:363 fuse_lookup+0x8f/0x4c0 fs/fuse/dir.c:359 __lookup_slow+0x2b5/0x540 fs/namei.c:1630 lookup_slow+0x57/0x80 fs/namei.c:1647 walk_component+0x94a/0x2630 fs/namei.c:1769 lookup_last fs/namei.c:2237 [inline] path_lookupat.isra.45+0x202/0xbf0 fs/namei.c:2287 filename_lookup+0x264/0x510 fs/namei.c:2321 user_path_at_empty+0x40/0x50 fs/namei.c:2584 user_path_at include/linux/namei.h:57 [inline] vfs_statx+0x129/0x210 fs/stat.c:185 vfs_stat include/linux/fs.h:3102 [inline] __do_compat_sys_newstat+0x8f/0x110 fs/stat.c:626 __se_compat_sys_newstat fs/stat.c:620 [inline] __ia32_compat_sys_newstat+0x52/0x70 fs/stat.c:620 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 -> #1 (&type->i_mutex_dir_key#5){++++}: down_write+0x8f/0x130 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:715 [inline] utimes_common.isra.1+0x45c/0x8e0 fs/utimes.c:90 do_utimes+0x1f7/0x380 fs/utimes.c:156 __do_compat_sys_utime fs/utimes.c:245 [inline] __se_compat_sys_utime fs/utimes.c:233 [inline] __ia32_compat_sys_utime+0x1e5/0x2a0 fs/utimes.c:233 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 -> #0 (sb_writers#17){.+.+}: lock_acquire+0x1e4/0x540 kernel/locking/lockdep.c:3924 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+0x1e9/0x300 fs/super.c:1403 sb_start_write include/linux/fs.h:1554 [inline] mnt_want_write+0x3f/0xc0 fs/namespace.c:386 do_last fs/namei.c:3389 [inline] path_openat+0x931/0x4e10 fs/namei.c:3540 do_filp_open+0x255/0x380 fs/namei.c:3574 do_sys_open+0x584/0x760 fs/open.c:1101 ksys_open include/linux/syscalls.h:1275 [inline] __do_sys_creat fs/open.c:1159 [inline] __se_sys_creat fs/open.c:1157 [inline] __ia32_sys_creat+0x5f/0x80 fs/open.c:1157 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 other info that might help us debug this: Chain exists of: sb_writers#17 --> &type->i_mutex_dir_key#5 --> &fi->mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&fi->mutex); lock(&type->i_mutex_dir_key#5); lock(&fi->mutex); lock(sb_writers#17); *** DEADLOCK *** 1 lock held by syz-executor1/31374: #0: 0000000017f082b6 (&fi->mutex){+.+.}, at: fuse_lock_inode+0xaf/0xe0 fs/fuse/inode.c:363 stack backtrace: CPU: 0 PID: 31374 Comm: syz-executor1 Not tainted 4.18.0-rc8+ #85 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113 print_circular_bug.isra.36.cold.57+0x1bd/0x27d kernel/locking/lockdep.c:1227 check_prev_add kernel/locking/lockdep.c:1867 [inline] check_prevs_add kernel/locking/lockdep.c:1980 [inline] validate_chain kernel/locking/lockdep.c:2421 [inline] __lock_acquire+0x3449/0x5020 kernel/locking/lockdep.c:3435 lock_acquire+0x1e4/0x540 kernel/locking/lockdep.c:3924 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+0x1e9/0x300 fs/super.c:1403 sb_start_write include/linux/fs.h:1554 [inline] mnt_want_write+0x3f/0xc0 fs/namespace.c:386 do_last fs/namei.c:3389 [inline] path_openat+0x931/0x4e10 fs/namei.c:3540 do_filp_open+0x255/0x380 fs/namei.c:3574 do_sys_open+0x584/0x760 fs/open.c:1101 ksys_open include/linux/syscalls.h:1275 [inline] __do_sys_creat fs/open.c:1159 [inline] __se_sys_creat fs/open.c:1157 [inline] __ia32_sys_creat+0x5f/0x80 fs/open.c:1157 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7fabcb9 Code: 55 08 8b 88 64 cd ff ff 8b 98 68 cd ff ff 89 c8 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 1c 24 c3 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f5f860cc EFLAGS: 00000296 ORIG_RAX: 0000000000000008 RAX: ffffffffffffffda RBX: 0000000020000180 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Unknown ioctl 1074572970 Unknown ioctl 1074572970 IPVS: set_ctl: invalid protocol: 190 172.20.20.187:20004 IPVS: set_ctl: invalid protocol: 190 172.20.20.187:20004