================================ WARNING: inconsistent lock state syzkaller #0 Not tainted -------------------------------- inconsistent {INITIAL USE} -> {IN-NMI} usage. syz.0.3894/17106 [HC1[1]:SC0[0]:HE0:SE1] takes: ffffffff8e297dd8 (kernfs_rename_lock){....}-{2:2}, at: kernfs_path_from_node+0x88/0xbd0 fs/kernfs/dir.c:229 {INITIAL USE} state was registered at: lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5790 __raw_write_lock_irq include/linux/rwlock_api_smp.h:195 [inline] _raw_write_lock_irq+0xaf/0xf0 kernel/locking/spinlock.c:326 kernfs_rename_ns+0x5e4/0x830 fs/kernfs/dir.c:1762 sysfs_rename_link_ns+0x175/0x1b0 fs/sysfs/symlink.c:192 device_rename+0x110/0x1e0 drivers/base/core.c:4665 dev_change_name+0x308/0x8e0 net/core/dev.c:1291 do_setlink+0x9b6/0x3f00 net/core/rtnetlink.c:2902 __rtnl_newlink net/core/rtnetlink.c:3720 [inline] rtnl_newlink+0x1848/0x2170 net/core/rtnetlink.c:3767 rtnetlink_rcv_msg+0x843/0xf90 net/core/rtnetlink.c:6489 netlink_rcv_skb+0x235/0x4c0 net/netlink/af_netlink.c:2554 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x856/0x9e0 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x8d0/0xbf0 net/netlink/af_netlink.c:1903 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] __sys_sendto+0x4a9/0x6b0 net/socket.c:2201 __do_sys_sendto net/socket.c:2213 [inline] __se_sys_sendto net/socket.c:2209 [inline] __x64_sys_sendto+0xde/0xf0 net/socket.c:2209 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 irq event stamp: 2476 hardirqs last enabled at (2475): [] ___slab_alloc+0x10e9/0x12f0 mm/slub.c:3209 hardirqs last disabled at (2476): [] exc_debug_kernel arch/x86/kernel/traps.c:1063 [inline] hardirqs last disabled at (2476): [] exc_debug+0x73/0x140 arch/x86/kernel/traps.c:1199 softirqs last enabled at (2456): [] sockopt_release_sock net/core/sock.c:1075 [inline] softirqs last enabled at (2456): [] sk_setsockopt+0x25fa/0x2b20 net/core/sock.c:1561 softirqs last disabled at (2454): [] spin_lock_bh include/linux/spinlock.h:356 [inline] softirqs last disabled at (2454): [] release_sock+0x2f/0x1c0 net/core/sock.c:3579 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(kernfs_rename_lock); lock(kernfs_rename_lock); *** DEADLOCK *** no locks held by syz.0.3894/17106. stack backtrace: CPU: 0 PID: 17106 Comm: syz.0.3894 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Call Trace: <#DB> dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 lock_acquire+0x2c2/0x420 kernel/locking/lockdep.c:5781 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline] _raw_read_lock_irqsave+0xbc/0x100 kernel/locking/spinlock.c:236 kernfs_path_from_node+0x88/0xbd0 fs/kernfs/dir.c:229 kernfs_path include/linux/kernfs.h:597 [inline] cgroup_path include/linux/cgroup.h:601 [inline] get_mm_memcg_path+0xb9/0x360 mm/mmap_lock.c:82 __mmap_lock_do_trace_start_locking+0xe6/0x2f0 mm/mmap_lock.c:95 __mmap_lock_trace_start_locking include/linux/mmap_lock.h:29 [inline] mmap_read_trylock include/linux/mmap_lock.h:164 [inline] stack_map_get_build_id_offset+0x661/0x810 kernel/bpf/stackmap.c:142 __bpf_get_stackid+0x5ac/0x980 kernel/bpf/stackmap.c:255 ____bpf_get_stackid kernel/bpf/stackmap.c:316 [inline] bpf_get_stackid+0x131/0x1f0 kernel/bpf/stackmap.c:291 bpf_prog_12712c88fd19bd5b+0x29/0x2d bpf_dispatcher_nop_func include/linux/bpf.h:1226 [inline] __bpf_prog_run include/linux/filter.h:617 [inline] bpf_prog_run include/linux/filter.h:624 [inline] bpf_overflow_handler+0x1fc/0x510 kernel/events/core.c:10572 __perf_event_overflow+0x461/0x660 kernel/events/core.c:9708 perf_swevent_overflow kernel/events/core.c:9791 [inline] perf_swevent_event+0x319/0x570 kernel/events/core.c:9842 perf_bp_event+0x319/0x430 kernel/events/core.c:10769 hw_breakpoint_handler arch/x86/kernel/hw_breakpoint.c:555 [inline] hw_breakpoint_exceptions_notify+0x23e/0x670 arch/x86/kernel/hw_breakpoint.c:586 notifier_call_chain+0x18f/0x380 kernel/notifier.c:93 atomic_notifier_call_chain+0xda/0x180 kernel/notifier.c:231 notify_die+0x145/0x1a0 kernel/notifier.c:596 notify_debug+0x2e/0x50 arch/x86/kernel/traps.c:1042 exc_debug_kernel arch/x86/kernel/traps.c:1099 [inline] exc_debug+0xde/0x140 arch/x86/kernel/traps.c:1199 asm_exc_debug+0x1e/0x40 arch/x86/include/asm/idtentry.h:644 RIP: 0010:copy_iovec_from_user lib/iov_iter.c:1383 [inline] RIP: 0010:iovec_from_user+0x102/0x240 lib/iov_iter.c:1424 Code: 01 e3 0f 88 2a 01 00 00 4c 39 e3 0f 82 21 01 00 00 0f 01 cb 0f ae e8 49 ff cf 48 8b 1c 24 49 89 dd 49 8b 6c 24 08 4d 8b 34 24 <31> ff 48 89 ee e8 24 1b 5a fd 48 85 ed 0f 88 ce 00 00 00 4c 89 e8 RSP: 0018:ffffc9001117fa58 EFLAGS: 00040286 RAX: ffffffff842dc81a RBX: ffff888025b393c0 RCX: 0000000000080000 RDX: ffffc9000cad9000 RSI: 0000000000000156 RDI: 0000000000000157 RBP: 0000000000000000 R08: 0000000000001000 R09: 00000000e5ae7062 R10: 000000000fcdecad R11: fffffbfff1f1bb4e R12: 00002000000016c0 R13: ffff888025b393c0 R14: 0000000000000000 R15: 0000000000000016 __import_iovec+0x13d/0x850 lib/iov_iter.c:1470 import_iovec+0x73/0xa0 lib/iov_iter.c:1535 copy_msghdr_from_user net/socket.c:2532 [inline] sendmsg_copy_msghdr net/socket.c:2626 [inline] ___sys_sendmsg+0x256/0x360 net/socket.c:2645 __sys_sendmsg net/socket.c:2678 [inline] __do_sys_sendmsg net/socket.c:2687 [inline] __se_sys_sendmsg+0x1d0/0x2c0 net/socket.c:2685 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f52357a94d9 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:00007f52366a7028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f5235a25fa0 RCX: 00007f52357a94d9 RDX: 0000000000000000 RSI: 00002000000012c0 RDI: 000000000000000d RBP: 00007f523583804e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f5235a26038 R14: 00007f5235a25fa0 R15: 00007ffcb164e8c8 ---------------- Code disassembly (best guess): 0: 01 e3 add %esp,%ebx 2: 0f 88 2a 01 00 00 js 0x132 8: 4c 39 e3 cmp %r12,%rbx b: 0f 82 21 01 00 00 jb 0x132 11: 0f 01 cb stac 14: 0f ae e8 lfence 17: 49 ff cf dec %r15 1a: 48 8b 1c 24 mov (%rsp),%rbx 1e: 49 89 dd mov %rbx,%r13 21: 49 8b 6c 24 08 mov 0x8(%r12),%rbp 26: 4d 8b 34 24 mov (%r12),%r14 * 2a: 31 ff xor %edi,%edi <-- trapping instruction 2c: 48 89 ee mov %rbp,%rsi 2f: e8 24 1b 5a fd call 0xfd5a1b58 34: 48 85 ed test %rbp,%rbp 37: 0f 88 ce 00 00 00 js 0x10b 3d: 4c 89 e8 mov %r13,%rax