================================ WARNING: inconsistent lock state 6.10.0-rc2-syzkaller-00440-ga99997323654 #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-fuzzer/5089 [HC0[0]:SC1[1]:HE1:SE0] takes: ffff8880b9438828 (lock#10){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9438828 (lock#10){+.?.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x8f/0x630 mm/mmap_lock.c:237 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x630 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_write_lock_killable include/linux/mmap_lock.h:123 [inline] vm_mmap_pgoff+0x3a7/0x3d0 mm/util.c:571 ksys_mmap_pgoff+0x4f1/0x720 mm/mmap.c:1443 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 288784 hardirqs last enabled at (288784): [] net_rx_action+0x4c0/0x10a0 net/core/dev.c:6883 hardirqs last disabled at (288783): [] net_rx_action+0x34f/0x10a0 net/core/dev.c:6881 softirqs last enabled at (287204): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last enabled at (287204): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last enabled at (287204): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 softirqs last disabled at (288781): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (288781): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (288781): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 3 locks held by syz-fuzzer/5089: #0: ffff888140e8b0d8 (_xmit_ETHER#2){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #0: ffff888140e8b0d8 (_xmit_ETHER#2){+.-.}-{2:2}, at: __netif_tx_lock include/linux/netdevice.h:4347 [inline] #0: ffff888140e8b0d8 (_xmit_ETHER#2){+.-.}-{2:2}, at: virtnet_poll_tx+0x202/0x730 drivers/net/virtio_net.c:2472 #1: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #1: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2444 #2: ffff88802e0da798 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #2: ffff88802e0da798 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x237/0x9d0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 0 PID: 5089 Comm: syz-fuzzer Not tainted 6.10.0-rc2-syzkaller-00440-ga99997323654 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 valid_state+0x13a/0x1c0 kernel/locking/lockdep.c:4013 mark_lock_irq+0xbb/0xc20 kernel/locking/lockdep.c:4216 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4678 __lock_acquire+0xbcd/0x1fd0 kernel/locking/lockdep.c:5091 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x630 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:164 [inline] stack_map_get_build_id_offset+0x9af/0x9d0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x4ad/0x5a0 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1994 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1984 bpf_prog_e6cf5f9c69743609+0x42/0x46 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2403 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2444 trace_consume_skb+0x1b2/0x220 include/trace/events/skb.h:54 napi_consume_skb+0xb0/0x1f0 net/core/skbuff.c:1481 __free_old_xmit+0x184/0x420 drivers/net/virtio_net.c:524 free_old_xmit drivers/net/virtio_net.c:962 [inline] virtnet_poll_tx+0x27a/0x730 drivers/net/virtio_net.c:2474 __napi_poll+0xcb/0x490 net/core/dev.c:6722 napi_poll net/core/dev.c:6791 [inline] net_rx_action+0x7bb/0x10a0 net/core/dev.c:6907 handle_softirqs+0x2c4/0x970 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649 common_interrupt+0xaa/0xd0 arch/x86/kernel/irq.c:278 asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xd8/0x140 kernel/locking/spinlock.c:194 Code: 9c 8f 44 24 20 42 80 3c 23 00 74 08 4c 89 f7 e8 9e 55 6a f6 f6 44 24 21 02 75 52 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 63 07 d4 f5 65 8b 05 94 41 72 74 85 c0 74 43 48 c7 04 24 0e 36 RSP: 0018:ffffc9000333fb80 EFLAGS: 00000206 RAX: 866f7294d6156800 RBX: 1ffff92000667f74 RCX: ffffffff947a3603 RDX: dffffc0000000000 RSI: ffffffff8bcabb80 RDI: 0000000000000001 RBP: ffffc9000333fc10 R08: ffffffff8fad4c6f R09: 1ffffffff1f5a98d R10: dffffc0000000000 R11: fffffbfff1f5a98e R12: dffffc0000000000 R13: 1ffff92000667f70 R14: ffffc9000333fba0 R15: 0000000000000246 hrtimer_start_expires include/linux/hrtimer.h:289 [inline] hrtimer_sleeper_start_expires kernel/time/hrtimer.c:1949 [inline] do_nanosleep+0x158/0x600 kernel/time/hrtimer.c:2025 hrtimer_nanosleep+0x227/0x470 kernel/time/hrtimer.c:2081 __do_sys_nanosleep kernel/time/hrtimer.c:2116 [inline] __se_sys_nanosleep kernel/time/hrtimer.c:2102 [inline] __x64_sys_nanosleep+0x26e/0x2d0 kernel/time/hrtimer.c:2102 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x472f37 Code: 8b 44 24 20 b9 40 42 0f 00 f7 f1 48 89 04 24 b8 e8 03 00 00 f7 e2 48 89 44 24 08 48 89 e7 be 00 00 00 00 b8 23 00 00 00 0f 05 <48> 83 c4 10 5d c3 cc cc cc b8 ba 00 00 00 0f 05 89 44 24 08 c3 cc RSP: 002b:000000c00006bf18 EFLAGS: 00000202 ORIG_RAX: 0000000000000023 RAX: ffffffffffffffda RBX: 0000000000000014 RCX: 0000000000472f37 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000c00006bf18 RBP: 000000c00006bf28 R08: 000000000000056e R09: 000000000000001d R10: 00007fdc2e4700b8 R11: 0000000000000202 R12: 000000c00006bf18 R13: 000000c0000e4400 R14: 000000c0000064e0 R15: 000000000000000f ---------------- Code disassembly (best guess): 0: 9c pushf 1: 8f 44 24 20 pop 0x20(%rsp) 5: 42 80 3c 23 00 cmpb $0x0,(%rbx,%r12,1) a: 74 08 je 0x14 c: 4c 89 f7 mov %r14,%rdi f: e8 9e 55 6a f6 call 0xf66a55b2 14: f6 44 24 21 02 testb $0x2,0x21(%rsp) 19: 75 52 jne 0x6d 1b: 41 f7 c7 00 02 00 00 test $0x200,%r15d 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 63 07 d4 f5 call 0xf5d40792 <-- trapping instruction 2f: 65 8b 05 94 41 72 74 mov %gs:0x74724194(%rip),%eax # 0x747241ca 36: 85 c0 test %eax,%eax 38: 74 43 je 0x7d 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss