================================ WARNING: inconsistent lock state 6.10.0-syzkaller-04559-g7d30b8aa4fc3 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.1.548/7377 [HC1[1]:SC1[1]:HE0:SE0] takes: ffff8880b9338798 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9338798 (lock#10){?.+.}-{2:2}, at: __mmap_lock_do_trace_released+0x83/0x620 mm/mmap_lock.c:243 {HARDIRQ-ON-W} state was registered at: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_released+0x9c/0x620 mm/mmap_lock.c:243 __mmap_lock_trace_released include/linux/mmap_lock.h:42 [inline] mmap_read_unlock include/linux/mmap_lock.h:170 [inline] do_user_addr_fault arch/x86/mm/fault.c:1417 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x7a2/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 rep_movs_alternative+0x4a/0x70 arch/x86/lib/copy_user_64.S:65 copy_user_generic arch/x86/include/asm/uaccess_64.h:110 [inline] raw_copy_from_user arch/x86/include/asm/uaccess_64.h:125 [inline] copy_from_user_iter lib/iov_iter.c:55 [inline] iterate_ubuf include/linux/iov_iter.h:29 [inline] iterate_and_advance2 include/linux/iov_iter.h:245 [inline] iterate_and_advance include/linux/iov_iter.h:271 [inline] __copy_from_iter lib/iov_iter.c:249 [inline] _copy_from_iter+0x26b/0x1960 lib/iov_iter.c:260 copy_from_iter include/linux/uio.h:204 [inline] copy_from_iter_full include/linux/uio.h:221 [inline] sctp_user_addto_chunk+0x8c/0x220 net/sctp/sm_make_chunk.c:1565 sctp_datamsg_from_user+0x760/0xf20 net/sctp/chunk.c:269 sctp_sendmsg_to_asoc+0xf7e/0x1800 net/sctp/socket.c:1859 sctp_sendmsg+0x1bc3/0x3520 net/sctp/socket.c:2031 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x1a6/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2597 ___sys_sendmsg net/socket.c:2651 [inline] __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2680 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: 10451 hardirqs last enabled at (10450): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (10450): [] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:202 hardirqs last disabled at (10451): [] sysvec_irq_work+0xe/0xc0 arch/x86/kernel/irq_work.c:17 softirqs last enabled at (10446): [] bpf_test_run_xdp_live+0x5bf/0x2110 softirqs last disabled at (10447): [] do_softirq+0x11b/0x1e0 kernel/softirq.c:455 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 1 lock held by syz.1.548/7377: #0: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #0: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #0: ffffffff8e735fe0 (rcu_read_lock){....}-{1:2}, at: bpf_test_timer_enter+0x19/0x140 net/bpf/test_run.c:40 stack backtrace: CPU: 1 PID: 7377 Comm: syz.1.548 Not tainted 6.10.0-syzkaller-04559-g7d30b8aa4fc3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/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:4012 mark_lock_irq+0xbb/0xc20 kernel/locking/lockdep.c:4215 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4677 mark_usage kernel/locking/lockdep.c:4563 [inline] __lock_acquire+0xb8e/0x1fd0 kernel/locking/lockdep.c:5090 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_released+0x9c/0x620 mm/mmap_lock.c:243 __mmap_lock_trace_released include/linux/mmap_lock.h:42 [inline] mmap_read_unlock_non_owner include/linux/mmap_lock.h:176 [inline] do_mmap_read_unlock+0x5d/0x60 kernel/bpf/task_iter.c:1046 irq_work_single+0xe2/0x240 kernel/irq_work.c:221 irq_work_run_list kernel/irq_work.c:252 [inline] irq_work_run+0x18b/0x350 kernel/irq_work.c:261 __sysvec_irq_work+0xb8/0x430 arch/x86/kernel/irq_work.c:22 instr_sysvec_irq_work arch/x86/kernel/irq_work.c:17 [inline] sysvec_irq_work+0x4f/0xc0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x1a/0x20 arch/x86/include/asm/idtentry.h:738 RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irq+0x29/0x50 kernel/locking/spinlock.c:202 Code: 90 f3 0f 1e fa 53 48 89 fb 48 83 c7 18 48 8b 74 24 08 e8 2a d9 b6 f5 48 89 df e8 c2 1b b8 f5 e8 8d e4 e1 f5 fb bf 01 00 00 00 42 e8 a9 f5 65 8b 05 33 f8 47 74 85 c0 74 06 5b c3 cc cc cc cc RSP: 0018:ffffc90000a18d50 EFLAGS: 00000282 RAX: ad754923778a9d00 RBX: ffff8880b932a700 RCX: ffffffff94ce8703 RDX: dffffc0000000000 RSI: ffffffff8beac920 RDI: 0000000000000001 RBP: ffffc90000a18eb0 R08: ffffffff8ff6666f R09: 1ffffffff1fecccd R10: dffffc0000000000 R11: fffffbfff1feccce R12: ffff8880b932a748 R13: ffffc90000a18e00 R14: dffffc0000000000 R15: 00000000ffffbe56 __run_timer_base+0x1c0/0x8e0 kernel/time/timer.c:2429 run_timer_base kernel/time/timer.c:2437 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2447 handle_softirqs+0x2c4/0x970 kernel/softirq.c:554 do_softirq+0x11b/0x1e0 kernel/softirq.c:455 __local_bh_enable_ip+0x1bb/0x200 kernel/softirq.c:382 local_bh_enable include/linux/bottom_half.h:33 [inline] xdp_test_run_batch net/bpf/test_run.c:367 [inline] bpf_test_run_xdp_live+0x1bde/0x2110 net/bpf/test_run.c:389 bpf_prog_test_run_xdp+0x80e/0x11b0 net/bpf/test_run.c:1317 bpf_prog_test_run+0x33a/0x3b0 kernel/bpf/syscall.c:4313 __sys_bpf+0x48d/0x810 kernel/bpf/syscall.c:5728 __do_sys_bpf kernel/bpf/syscall.c:5817 [inline] __se_sys_bpf kernel/bpf/syscall.c:5815 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5815 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:0x7fab51577299 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fab522d9048 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007fab51705f80 RCX: 00007fab51577299 RDX: 0000000000000050 RSI: 0000000020000000 RDI: 000000000000000a RBP: 00007fab515e48e6 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fab51705f80 R15: 00007fff381c6028 ---------------- Code disassembly (best guess): 0: 90 nop 1: f3 0f 1e fa endbr64 5: 53 push %rbx 6: 48 89 fb mov %rdi,%rbx 9: 48 83 c7 18 add $0x18,%rdi d: 48 8b 74 24 08 mov 0x8(%rsp),%rsi 12: e8 2a d9 b6 f5 call 0xf5b6d941 17: 48 89 df mov %rbx,%rdi 1a: e8 c2 1b b8 f5 call 0xf5b81be1 1f: e8 8d e4 e1 f5 call 0xf5e1e4b1 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 42 e8 a9 f5 call 0xf5a9e871 <-- trapping instruction 2f: 65 8b 05 33 f8 47 74 mov %gs:0x7447f833(%rip),%eax # 0x7447f869 36: 85 c0 test %eax,%eax 38: 74 06 je 0x40 3a: 5b pop %rbx 3b: c3 ret 3c: cc int3 3d: cc int3 3e: cc int3 3f: cc int3