================================ WARNING: inconsistent lock state 6.1.86-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.3/3975 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b9935e90 (lock#10){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9935e90 (lock#10){+.?.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x84/0x670 mm/mmap_lock.c:237 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x9d/0x670 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:137 [inline] get_mmap_lock_carefully mm/memory.c:5304 [inline] lock_mm_and_find_vma+0x219/0x2e0 mm/memory.c:5366 do_user_addr_fault arch/x86/mm/fault.c:1343 [inline] handle_page_fault arch/x86/mm/fault.c:1462 [inline] exc_page_fault+0x169/0x660 arch/x86/mm/fault.c:1518 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570 copy_user_enhanced_fast_string+0xa/0x40 arch/x86/lib/copy_user_64.S:165 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_from_user arch/x86/include/asm/uaccess_64.h:52 [inline] copyin+0xd8/0x120 lib/iov_iter.c:183 _copy_from_iter+0x493/0xff0 lib/iov_iter.c:631 copy_from_iter include/linux/uio.h:187 [inline] copy_from_iter_full include/linux/uio.h:194 [inline] skb_do_copy_data_nocache include/net/sock.h:2315 [inline] skb_copy_to_page_nocache include/net/sock.h:2341 [inline] kcm_sendmsg+0xb8a/0x2580 net/kcm/kcmsock.c:995 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] ____sys_sendmsg+0x5a5/0x8f0 net/socket.c:2514 ___sys_sendmsg net/socket.c:2568 [inline] __sys_sendmsg+0x2a9/0x390 net/socket.c:2597 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 irq event stamp: 633 hardirqs last enabled at (632): [] __do_softirq+0x1eb/0xa4c kernel/softirq.c:555 hardirqs last disabled at (633): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (633): [] _raw_spin_lock_irq+0xa9/0x110 kernel/locking/spinlock.c:170 softirqs last enabled at (618): [] local_bh_disable include/linux/bottom_half.h:20 [inline] softirqs last enabled at (618): [] rcu_read_lock_bh include/linux/rcupdate.h:843 [inline] softirqs last enabled at (618): [] __dev_queue_xmit+0x2d6/0x3cf0 net/core/dev.c:4216 softirqs last disabled at (631): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last disabled at (631): [] __irq_exit_rcu+0x155/0x240 kernel/softirq.c:650 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 7 locks held by syz-executor.3/3975: #0: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #0: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #0: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: rtnetlink_rcv_msg+0x1f9/0xff0 net/core/rtnetlink.c:6044 #1: ffffffff8d006e60 (console_lock){+.+.}-{0:0}, at: _printk+0xd1/0x111 kernel/printk/printk.c:2328 #2: ffffc900001e0bc0 (&(&bat_priv->nc.work)->timer){..-.}-{0:0}, at: call_timer_fn+0xc2/0x6b0 kernel/time/timer.c:1501 #3: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #3: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #3: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: __queue_work+0xe5/0xf90 kernel/workqueue.c:1443 #4: ffff888012479818 (&pool->lock/1){..-.}-{2:2}, at: __queue_work+0x58c/0xf90 #5: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #5: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #5: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #5: ffffffff8d12ac40 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x146/0x440 kernel/trace/bpf_trace.c:2313 #6: ffff8880218eae58 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #6: ffff8880218eae58 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x232/0x9c0 kernel/bpf/stackmap.c:144 stack backtrace: CPU: 1 PID: 3975 Comm: syz-executor.3 Not tainted 6.1.86-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 valid_state+0x136/0x1c0 kernel/locking/lockdep.c:3969 mark_lock_irq+0xa8/0xba0 kernel/locking/lockdep.c:4172 mark_lock+0x21c/0x340 kernel/locking/lockdep.c:4628 __lock_acquire+0xb7f/0x1f80 kernel/locking/lockdep.c:5003 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x9d/0x670 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:137 [inline] stack_map_get_build_id_offset+0x99e/0x9c0 kernel/bpf/stackmap.c:144 __bpf_get_stack+0x495/0x570 kernel/bpf/stackmap.c:452 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1877 [inline] bpf_get_stack_raw_tp+0x1b2/0x220 kernel/trace/bpf_trace.c:1867 bpf_prog_e6cf5f9c69743609+0x3a/0x3e bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run3+0x231/0x440 kernel/trace/bpf_trace.c:2313 trace_workqueue_queue_work include/trace/events/workqueue.h:23 [inline] __queue_work+0xeeb/0xf90 kernel/workqueue.c:1500 call_timer_fn+0x1ad/0x6b0 kernel/time/timer.c:1504 expire_timers kernel/time/timer.c:1544 [inline] __run_timers+0x6a8/0x890 kernel/time/timer.c:1820 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1833 __do_softirq+0x2e9/0xa4c kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x155/0x240 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653 RIP: 0010:console_emit_next_record+0xd67/0x1000 kernel/printk/printk.c:2786 Code: 2a 1c 00 44 0f b6 74 24 1f 48 83 7c 24 30 00 75 07 e8 6d 2a 1c 00 eb 06 e8 66 2a 1c 00 fb 48 c7 84 24 a0 00 00 00 0e 36 e0 45 <43> c7 04 2c 00 00 00 00 4b c7 44 2c 0a 00 00 00 00 4b c7 44 2c 12 RSP: 0018:ffffc90007afec80 EFLAGS: 00000287 RAX: ffffffff816e64ea RBX: ffffffff816e622c RCX: 0000000000040000 RDX: ffffc9000d58e000 RSI: 0000000000002c26 RDI: 0000000000002c27 RBP: ffffc90007afef30 R08: ffffffff816e64c2 R09: fffffbfff2093445 R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000 R13: 1ffff92000f5fda4 R14: 0000000000000001 R15: 0000000000000000 console_unlock+0x278/0x7c0 kernel/printk/printk.c:2906 vprintk_emit+0x523/0x740 kernel/printk/printk.c:2303 _printk+0xd1/0x111 kernel/printk/printk.c:2328 validate_nla lib/nlattr.c:395 [inline] __nla_validate_parse+0xdc3/0x2b70 lib/nlattr.c:607 __nla_parse+0x3c/0x50 lib/nlattr.c:704 __nlmsg_parse include/net/netlink.h:748 [inline] nlmsg_parse_deprecated include/net/netlink.h:789 [inline] rtnl_calcit net/core/rtnetlink.c:3857 [inline] rtnetlink_rcv_msg+0x8a1/0xff0 net/core/rtnetlink.c:6061 netlink_rcv_skb+0x1cd/0x410 net/netlink/af_netlink.c:2508 netlink_unicast_kernel net/netlink/af_netlink.c:1326 [inline] netlink_unicast+0x7d8/0x970 net/netlink/af_netlink.c:1352 netlink_sendmsg+0xa26/0xd60 net/netlink/af_netlink.c:1874 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:730 [inline] ____sys_sendmsg+0x5a5/0x8f0 net/socket.c:2514 ___sys_sendmsg net/socket.c:2568 [inline] __sys_sendmsg+0x2a9/0x390 net/socket.c:2597 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f5fa1a7de69 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f5fa27310c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f5fa1bac120 RCX: 00007f5fa1a7de69 RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 00007f5fa1aca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f5fa1bac120 R15: 00007ffdcf15f828 ---------------- Code disassembly (best guess): 0: 2a 1c 00 sub (%rax,%rax,1),%bl 3: 44 0f b6 74 24 1f movzbl 0x1f(%rsp),%r14d 9: 48 83 7c 24 30 00 cmpq $0x0,0x30(%rsp) f: 75 07 jne 0x18 11: e8 6d 2a 1c 00 call 0x1c2a83 16: eb 06 jmp 0x1e 18: e8 66 2a 1c 00 call 0x1c2a83 1d: fb sti 1e: 48 c7 84 24 a0 00 00 movq $0x45e0360e,0xa0(%rsp) 25: 00 0e 36 e0 45 * 2a: 43 c7 04 2c 00 00 00 movl $0x0,(%r12,%r13,1) <-- trapping instruction 31: 00 32: 4b c7 44 2c 0a 00 00 movq $0x0,0xa(%r12,%r13,1) 39: 00 00 3b: 4b rex.WXB 3c: c7 .byte 0xc7 3d: 44 2c 12 rex.R sub $0x12,%al