================================ WARNING: inconsistent lock state 6.7.0-rc1-next-20231117-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. modprobe/8281 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff888078f540d8 (&sighand->siglock){?.+.}-{2:2}, at: __lock_task_sighand+0xc2/0x340 kernel/signal.c:1422 {HARDIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1b1/0x530 kernel/locking/lockdep.c:5718 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:351 [inline] class_spinlock_constructor include/linux/spinlock.h:530 [inline] ptrace_set_stopped kernel/ptrace.c:391 [inline] ptrace_attach+0x401/0x650 kernel/ptrace.c:478 __do_sys_ptrace+0x204/0x230 kernel/ptrace.c:1290 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x62/0x6a irq event stamp: 1950 hardirqs last enabled at (1949): [] seqcount_lockdep_reader_access include/linux/seqlock.h:104 [inline] hardirqs last enabled at (1949): [] ktime_get_coarse_real_ts64+0x1a5/0x200 kernel/time/timekeeping.c:2261 hardirqs last disabled at (1950): [] sysvec_apic_timer_interrupt+0xe/0xb0 arch/x86/kernel/apic/apic.c:1076 softirqs last enabled at (1232): [] softirq_handle_end kernel/softirq.c:399 [inline] softirqs last enabled at (1232): [] __do_softirq+0x591/0x8d5 kernel/softirq.c:582 softirqs last disabled at (1103): [] invoke_softirq kernel/softirq.c:427 [inline] softirqs last disabled at (1103): [] __irq_exit_rcu kernel/softirq.c:632 [inline] softirqs last disabled at (1103): [] irq_exit_rcu+0xb5/0x120 kernel/softirq.c:644 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&sighand->siglock); lock(&sighand->siglock); *** DEADLOCK *** 4 locks held by modprobe/8281: #0: ffff8880192ea7a0 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:124 [inline] #0: ffff8880192ea7a0 (&mm->mmap_lock){++++}-{3:3}, at: vm_mmap_pgoff+0x15c/0x3c0 mm/util.c:554 #1: ffff88807e6b01b0 (&new_timer->it_lock){-...}-{2:2}, at: posix_timer_fn+0x2d/0x3d0 kernel/time/posix-timers.c:318 #2: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:301 [inline] #2: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline] #2: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: send_sigqueue+0x10c/0x840 kernel/signal.c:1978 #3: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:301 [inline] #3: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline] #3: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: __lock_task_sighand+0x3f/0x340 kernel/signal.c:1405 stack backtrace: CPU: 0 PID: 8281 Comm: modprobe Not tainted 6.7.0-rc1-next-20231117-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_usage_bug kernel/locking/lockdep.c:3970 [inline] valid_state kernel/locking/lockdep.c:4012 [inline] mark_lock_irq kernel/locking/lockdep.c:4215 [inline] mark_lock+0x91a/0xc50 kernel/locking/lockdep.c:4677 mark_usage kernel/locking/lockdep.c:4563 [inline] __lock_acquire+0x1347/0x3b10 kernel/locking/lockdep.c:5090 lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1b1/0x530 kernel/locking/lockdep.c:5718 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x50 kernel/locking/spinlock.c:162 __lock_task_sighand+0xc2/0x340 kernel/signal.c:1422 lock_task_sighand include/linux/sched/signal.h:748 [inline] send_sigqueue+0x1d4/0x840 kernel/signal.c:1996 posix_timer_event kernel/time/posix-timers.c:298 [inline] posix_timer_fn+0x181/0x3d0 kernel/time/posix-timers.c:324 __run_hrtimer kernel/time/hrtimer.c:1688 [inline] __hrtimer_run_queues+0x20c/0xc20 kernel/time/hrtimer.c:1752 hrtimer_interrupt+0x31b/0x800 kernel/time/hrtimer.c:1814 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1065 [inline] __sysvec_apic_timer_interrupt+0x10c/0x410 arch/x86/kernel/apic/apic.c:1082 sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1076 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645 RIP: 0010:lock_acquire+0x0/0x530 kernel/locking/lockdep.c:5721 Code: 00 8b 74 24 04 e9 df fe ff ff 89 74 24 04 e8 07 8f 76 00 8b 74 24 04 e9 23 ff ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 0f 1e fa 48 b8 00 00 00 00 00 fc ff df 41 57 4d 89 cf 41 56 49 RSP: 0018:ffffc9000328fa40 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffff88803ec89008 RCX: 0000000000000001 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88803ec89078 RBP: 1ffff92000651f4a R08: 0000000000000001 R09: 0000000000000000 R10: 00007f6f04a1f000 R11: 0000000000000001 R12: dffffc0000000000 R13: ffff88803ec89000 R14: 00007f6f04a22fff R15: 00007f6f04a1f000 down_read+0x9a/0x330 kernel/locking/rwsem.c:1526 anon_vma_lock_read include/linux/rmap.h:131 [inline] validate_mm+0x1a8/0x4b0 mm/mmap.c:316 mmap_region+0x15e1/0x2a90 mm/mmap.c:2939 do_mmap+0x890/0xef0 mm/mmap.c:1379 vm_mmap_pgoff+0x1a7/0x3c0 mm/util.c:556 ksys_mmap_pgoff+0x421/0x5a0 mm/mmap.c:1425 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:93 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:86 [inline] __x64_sys_mmap+0x125/0x190 arch/x86/kernel/sys_x86_64.c:86 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x62/0x6a RIP: 0033:0x7f6f04a0db74 Code: 63 08 44 89 e8 5b 41 5c 41 5d c3 41 89 ca 41 f7 c1 ff 0f 00 00 74 0c c7 05 f5 46 01 00 16 00 00 00 eb 17 b8 09 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 0c f7 d8 89 05 dc 46 01 00 48 83 c8 ff c3 0f RSP: 002b:00007ffdce59c8b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007ffdce59c8f8 RCX: 00007f6f04a0db74 RDX: 0000000000000005 RSI: 0000000000123000 RDI: 00007f6f047a4000 RBP: 00007ffdce59d050 R08: 0000000000000000 R09: 0000000000028000 R10: 0000000000000812 R11: 0000000000000246 R12: 00007f6f049f05c0 R13: 00007ffdce59d0d8 R14: 0000000000027f38 R15: 0000000000000000 TCP: request_sock_TCP: Possible SYN flooding on port 0.0.0.0:55694. Sending cookies. ---------------- Code disassembly (best guess), 1 bytes skipped: 0: 8b 74 24 04 mov 0x4(%rsp),%esi 4: e9 df fe ff ff jmp 0xfffffee8 9: 89 74 24 04 mov %esi,0x4(%rsp) d: e8 07 8f 76 00 call 0x768f19 12: 8b 74 24 04 mov 0x4(%rsp),%esi 16: e9 23 ff ff ff jmp 0xffffff3e 1b: 66 66 2e 0f 1f 84 00 data16 cs nopw 0x0(%rax,%rax,1) 22: 00 00 00 00 26: 0f 1f 00 nopl (%rax) * 29: f3 0f 1e fa endbr64 <-- trapping instruction 2d: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 34: fc ff df 37: 41 57 push %r15 39: 4d 89 cf mov %r9,%r15 3c: 41 56 push %r14 3e: 49 rex.WB