md: md4 stopped.
============================================
WARNING: possible recursive locking detected
syzkaller #0 Tainted: G             L     
--------------------------------------------
syz.4.12606/26162 is trying to acquire lock:
ffff88810e121b48 (kn->active#59){++++}-{0:0}, at: __kernfs_remove+0x493/0x8e0

but task is already holding lock:
ffff88810e121b48 (kn->active#59){++++}-{0:0}, at: sysfs_unbreak_active_protection+0x22/0x40

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(kn->active#59);
  lock(kn->active#59);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

locks held by syz.4.12606/26162: 5, last CPU#0:
 #0: ffff8881122ec8f0 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x246/0x320
 #1: ffff88810d85c460 (sb_writers#7){.+.+}-{0:0}, at: vfs_write+0x22b/0xba0
 #2: ffff888117b74d08 (&of->prealloc_mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x147/0x540
 #3: ffff888117b74c80 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1d8/0x540
 #4: ffff88810e121b48 (kn->active#59){++++}-{0:0}, at: sysfs_unbreak_active_protection+0x22/0x40

stack backtrace:
CPU: 0 UID: 0 PID: 26162 Comm: syz.4.12606 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_deadlock_bug+0x27a/0x290
 __lock_acquire+0x25db/0x2de0
 lock_acquire+0x115/0x350
 kernfs_drain+0x293/0x640
 __kernfs_remove+0x493/0x8e0
 kernfs_remove_by_name_ns+0xc0/0x140
 sysfs_remove_group+0x101/0x2e0
 sysfs_remove_groups+0x54/0xb0
 __kobject_del+0x83/0x310
 kobject_put+0x23a/0x550
 md_attr_store+0x3f8/0x640
 kernfs_fop_write_iter+0x3a4/0x540
 vfs_write+0x612/0xba0
 ksys_write+0x150/0x270
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f636e99f559
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:00007f636cbb4028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f636ec26180 RCX: 00007f636e99f559
RDX: 0000000000000005 RSI: 0000200000000900 RDI: 000000000000000a
RBP: 00007f636ea36b20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f636ec26218 R14: 00007f636ec26180 R15: 00007ffeb3f0bc88
 </TASK>
