======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.4.736/12152 is trying to acquire lock:
ffff88811d34b460 (&pipe->mutex){+.+.}-{4:4}, at: iter_file_splice_write+0x1f0/0x10f0

but task is already holding lock:
ffff88811e222410 (sb_writers#5){.+.+}-{0:0}, at: do_splice+0xe57/0x1910

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #4 (sb_writers#5){.+.+}-{0:0}:
       sb_start_write+0x4d/0x1c0
       mnt_want_write+0x41/0x90
       ovl_create_object+0x108/0x3d0
       path_openat+0x1395/0x3860
       do_file_open+0x23e/0x4a0
       do_sys_openat2+0x113/0x200
       __x64_sys_openat+0x138/0x170
       do_syscall_64+0x15f/0xf80
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #3 (&ovl_i_mutex_dir_key[depth]#2){++++}-{4:4}:
       down_read+0x47/0x2e0
       lookup_slow+0x46/0x70
       path_lookupat+0x3f5/0x8c0
       filename_lookup+0x256/0x5d0
       kern_path+0x3d/0x150
       lookup_bdev+0xc8/0x290
       resume_store+0x16f/0x4f0
       kernfs_fop_write_iter+0x3af/0x540
       vfs_write+0x61d/0xb90
       ksys_write+0x150/0x270
       do_syscall_64+0x15f/0xf80
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #2 (&of->mutex){+.+.}-{4:4}:
       __mutex_lock+0x1a3/0x1550
       kernfs_seq_start+0x5c/0x420
       seq_read_iter+0x3f7/0xe10
       vfs_read+0x582/0xa70
       ksys_read+0x150/0x270
       do_syscall_64+0x15f/0xf80
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (&p->lock){+.+.}-{4:4}:
       __mutex_lock+0x1a3/0x1550
       seq_read_iter+0xb7/0xe10
       copy_splice_read+0x5ff/0xaa0
       splice_file_to_pipe+0x446/0x6b0
       do_sendfile+0x4db/0x7d0
       __se_sys_sendfile64+0x144/0x1a0
       do_syscall_64+0x15f/0xf80
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&pipe->mutex){+.+.}-{4:4}:
       __lock_acquire+0x15a5/0x2cf0
       lock_acquire+0x106/0x350
       __mutex_lock+0x1a3/0x1550
       iter_file_splice_write+0x1f0/0x10f0
       do_splice+0xee3/0x1910
       __se_sys_splice+0x353/0x490
       do_syscall_64+0x15f/0xf80
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

Chain exists of:
  &pipe->mutex --> &ovl_i_mutex_dir_key[depth]#2 --> sb_writers#5

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  rlock(sb_writers#5);
                               lock(&ovl_i_mutex_dir_key[depth]#2);
                               lock(sb_writers#5);
  lock(&pipe->mutex);

 *** DEADLOCK ***

1 lock held by syz.4.736/12152:
 #0: ffff88811e222410 (sb_writers#5){.+.+}-{0:0}, at: do_splice+0xe57/0x1910

stack backtrace:
CPU: 0 UID: 0 PID: 12152 Comm: syz.4.736 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_circular_bug+0x2e1/0x300
 check_noncircular+0x12e/0x150
 __lock_acquire+0x15a5/0x2cf0
 lock_acquire+0x106/0x350
 __mutex_lock+0x1a3/0x1550
 iter_file_splice_write+0x1f0/0x10f0
 do_splice+0xee3/0x1910
 __se_sys_splice+0x353/0x490
 do_syscall_64+0x15f/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1afd59cdd9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f1afe3c5028 EFLAGS: 00000246 ORIG_RAX: 0000000000000113
RAX: ffffffffffffffda RBX: 00007f1afd815fa0 RCX: 00007f1afd59cdd9
RDX: 0000000000000003 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00007f1afd632d69 R08: 000000000000009c R09: 0000000000000006
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f1afd816038 R14: 00007f1afd815fa0 R15: 00007ffd52da0e48
 </TASK>
