============================================ WARNING: possible recursive locking detected syzkaller #0 Not tainted -------------------------------------------- syz.7.1090/10930 is trying to acquire lock: ffff8880342d8e18 (kn->active#91){++++}-{0:0}, at: __kernfs_remove+0x493/0x910 fs/kernfs/dir.c:1629 but task is already holding lock: ffff8880342d8e18 (kn->active#91){++++}-{0:0}, at: kernfs_get_active_of fs/kernfs/file.c:73 [inline] ffff8880342d8e18 (kn->active#91){++++}-{0:0}, at: kernfs_fop_write_iter+0x22b/0x540 fs/kernfs/file.c:337 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(kn->active#91); lock(kn->active#91); *** DEADLOCK *** May be due to missing lock nesting notation locks held by syz.7.1090/10930: 4, on CPU#1: #0: ffff888023fcb5f0 (&f->f_pos_lock){+.+.}-{4:4}, at: fdget_pos+0x118/0x160 fs/file.c:1435 #1: ffff888034fda478 (sb_writers#7){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2769 [inline] #1: ffff888034fda478 (sb_writers#7){.+.+}-{0:0}, at: vfs_write+0x22b/0xba0 fs/read_write.c:668 #2: ffff888036525880 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1d8/0x540 fs/kernfs/file.c:336 #3: ffff8880342d8e18 (kn->active#91){++++}-{0:0}, at: kernfs_get_active_of fs/kernfs/file.c:73 [inline] #3: ffff8880342d8e18 (kn->active#91){++++}-{0:0}, at: kernfs_fop_write_iter+0x22b/0x540 fs/kernfs/file.c:337 stack backtrace: CPU: 1 UID: 0 PID: 10930 Comm: syz.7.1090 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_deadlock_bug+0x27a/0x290 kernel/locking/lockdep.c:3085 check_deadlock kernel/locking/lockdep.c:3137 [inline] validate_chain kernel/locking/lockdep.c:3939 [inline] __lock_acquire+0x25db/0x2de0 kernel/locking/lockdep.c:5288 lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942 kernfs_drain+0x293/0x640 fs/kernfs/dir.c:534 __kernfs_remove+0x493/0x910 fs/kernfs/dir.c:1629 kernfs_remove_by_name_ns+0xc0/0x140 fs/kernfs/dir.c:1847 kernfs_remove_by_name include/linux/kernfs.h:653 [inline] remove_files fs/sysfs/group.c:28 [inline] sysfs_remove_group+0x101/0x2e0 fs/sysfs/group.c:328 sysfs_remove_groups+0x54/0xb0 fs/sysfs/group.c:352 __kobject_del+0x83/0x310 lib/kobject.c:595 kobject_del+0x45/0x60 lib/kobject.c:627 rpc_sysfs_xprt_switch_destroy+0x59/0x90 net/sunrpc/sysfs.c:816 xprt_switch_free net/sunrpc/xprtmultipath.c:194 [inline] kref_put include/linux/kref.h:65 [inline] xprt_switch_put+0x33d/0x3c0 net/sunrpc/xprtmultipath.c:221 rpc_sysfs_xprt_switch_add_xprt_store+0x2d0/0x370 net/sunrpc/sysfs.c:362 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:580 [inline] vfs_write+0x612/0xba0 fs/read_write.c:672 ksys_write+0x150/0x270 fs/read_write.c:1021 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x00007f7e019a9559 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:00007f7e0281c028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f7e01c26180 RCX: 00007f7e019a9559 RDX: 0000000000000001 RSI: 0000200000001840 RDI: 000000000000000b RBP: 00007f7e01a38136 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f7e01c26218 R14: 00007f7e01c26180 R15: 00007fffba934f78