netlink: 204 bytes leftover after parsing attributes in process `syz.2.7345'.
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Tainted: G             L     
------------------------------------------------------
syz.2.7345/11824 is trying to acquire lock:
ffff88811e87b298 (&ovl_i_mutex_dir_key[depth]){++++}-{4:4}, at: lookup_slow+0x46/0x70

but task is already holding lock:
ffff88810fd51880 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1d8/0x540

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #4 (&of->mutex){+.+.}-{4:4}:
       __mutex_lock+0x19d/0x1550
       kernfs_seq_start+0x5d/0x420
       seq_read_iter+0x37e/0xca0
       vfs_read+0x595/0xa80
       ksys_read+0x150/0x270
       do_syscall_64+0x174/0x580
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #3 (&p->lock){+.+.}-{4:4}:
       __mutex_lock+0x19d/0x1550
       seq_read_iter+0xa4/0xca0
       proc_reg_read_iter+0x1b7/0x280
       copy_splice_read+0x5ff/0xaa0
       splice_file_to_pipe+0x444/0x6b0
       do_splice+0x11c2/0x1970
       __se_sys_splice+0x353/0x490
       do_syscall_64+0x174/0x580
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #2 (&pipe->mutex){+.+.}-{4:4}:
       __mutex_lock+0x19d/0x1550
       iter_file_splice_write+0x20a/0x1240
       do_splice+0xf14/0x1970
       __se_sys_splice+0x353/0x490
       do_syscall_64+0x174/0x580
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (sb_writers#5){.+.+}-{0:0}:
       sb_start_write+0x4d/0x1c0
       mnt_want_write+0x41/0x90
       ovl_xattr_set+0x15c/0x5f0
       __vfs_setxattr+0x442/0x480
       __vfs_setxattr_noperm+0x12a/0x660
       vfs_setxattr+0x163/0x360
       filename_setxattr+0x296/0x630
       path_setxattrat+0x408/0x450
       __x64_sys_setxattr+0xbc/0xe0
       do_syscall_64+0x174/0x580
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&ovl_i_mutex_dir_key[depth]){++++}-{4:4}:
       __lock_acquire+0x1520/0x2cf0
       lock_acquire+0x106/0x350
       down_read+0x4a/0x330
       lookup_slow+0x46/0x70
       path_lookupat+0x3f5/0x8c0
       filename_lookup+0x265/0x5d0
       kern_path+0x3d/0x150
       lookup_bdev+0xc8/0x290
       resume_store+0x16f/0x4f0
       kernfs_fop_write_iter+0x3a4/0x540
       vfs_write+0x612/0xba0
       ksys_write+0x150/0x270
       do_syscall_64+0x174/0x580
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

Chain exists of:
  &ovl_i_mutex_dir_key[depth] --> &p->lock --> &of->mutex

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&of->mutex);
                               lock(&p->lock);
                               lock(&of->mutex);
  rlock(&ovl_i_mutex_dir_key[depth]);

 *** DEADLOCK ***

4 locks held by syz.2.7345/11824:
 #0: ffff888110e380f0 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x246/0x320
 #1: ffff88816d328450 (sb_writers#7){.+.+}-{0:0}, at: vfs_write+0x22b/0xba0
 #2: ffff88810fd51880 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1d8/0x540
 #3: ffff8881616d00f8 (kn->active#85){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x22b/0x540

stack backtrace:
CPU: 0 UID: 0 PID: 11824 Comm: syz.2.7345 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
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+0x1520/0x2cf0
 lock_acquire+0x106/0x350
 down_read+0x4a/0x330
 lookup_slow+0x46/0x70
 path_lookupat+0x3f5/0x8c0
 filename_lookup+0x265/0x5d0
 kern_path+0x3d/0x150
 lookup_bdev+0xc8/0x290
 resume_store+0x16f/0x4f0
 kernfs_fop_write_iter+0x3a4/0x540
 vfs_write+0x612/0xba0
 ksys_write+0x150/0x270
 do_syscall_64+0x174/0x580
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f4c7eb9e0d9
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:00007f4c7cdf6028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f4c7ee25fa0 RCX: 00007f4c7eb9e0d9
RDX: 0000000000000012 RSI: 0000200000000000 RDI: 0000000000000005
RBP: 00007f4c7ec35024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f4c7ee26038 R14: 00007f4c7ee25fa0 R15: 00007ffe7a795788
 </TASK>
PM: Image not found (code -123)
