================================ WARNING: inconsistent lock state 6.7.0-rc1-next-20231117-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.5/6217 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880805c9bd8 (&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: 654 hardirqs last enabled at (653): [] irqentry_exit+0x3b/0x80 kernel/entry/common.c:435 hardirqs last disabled at (654): [] sysvec_apic_timer_interrupt+0xe/0xb0 arch/x86/kernel/apic/apic.c:1076 softirqs last enabled at (636): [] rcu_lock_release include/linux/rcupdate.h:306 [inline] softirqs last enabled at (636): [] rcu_read_unlock_bh include/linux/rcupdate.h:815 [inline] softirqs last enabled at (636): [] __dev_queue_xmit+0x86f/0x3d70 net/core/dev.c:4373 softirqs last disabled at (630): [] local_bh_disable include/linux/bottom_half.h:20 [inline] softirqs last disabled at (630): [] rcu_read_lock_bh include/linux/rcupdate.h:799 [inline] softirqs last disabled at (630): [] __dev_queue_xmit+0x244/0x3d70 net/core/dev.c:4271 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&sighand->siglock); lock(&sighand->siglock); *** DEADLOCK *** 6 locks held by syz-executor.5/6217: #0: ffffffff8eaa7c68 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline] #0: ffffffff8eaa7c68 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x372/0xe00 net/core/rtnetlink.c:6555 #1: ffffffff8cf9a640 (console_lock){+.+.}-{0:0}, at: console_trylock_spinning kernel/printk/printk.c:1923 [inline] #1: ffffffff8cf9a640 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x162/0x5f0 kernel/printk/printk.c:2302 #2: ffffffff8cf9a6b0 (console_srcu){....}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:301 [inline] #2: ffffffff8cf9a6b0 (console_srcu){....}-{0:0}, at: srcu_read_lock_nmisafe include/linux/srcu.h:232 [inline] #2: ffffffff8cf9a6b0 (console_srcu){....}-{0:0}, at: console_srcu_read_lock kernel/printk/printk.c:286 [inline] #2: ffffffff8cf9a6b0 (console_srcu){....}-{0:0}, at: console_flush_all+0x12a/0xd60 kernel/printk/printk.c:2959 #3: ffff8880293d2038 (&new_timer->it_lock){-...}-{2:2}, at: posix_timer_fn+0x2d/0x3d0 kernel/time/posix-timers.c:318 #4: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:301 [inline] #4: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline] #4: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: send_sigqueue+0x10c/0x840 kernel/signal.c:1978 #5: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:301 [inline] #5: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:747 [inline] #5: ffffffff8cfad060 (rcu_read_lock){....}-{1:2}, at: __lock_task_sighand+0x3f/0x340 kernel/signal.c:1405 stack backtrace: CPU: 0 PID: 6217 Comm: syz-executor.5 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:console_flush_all+0xa0d/0xd60 kernel/printk/printk.c:2973 Code: e8 78 8c 23 00 9c 5b 81 e3 00 02 00 00 31 ff 48 89 de e8 d6 cd 1c 00 48 85 db 0f 85 7c 01 00 00 e8 38 d2 1c 00 fb 48 8b 04 24 <4c> 89 fa 83 e2 07 0f b6 00 38 d0 7f 08 84 c0 0f 85 55 02 00 00 41 RSP: 0018:ffffc9000a817038 EFLAGS: 00000283 RAX: fffff52001502e2e RBX: 0000000000000000 RCX: ffffc9001464a000 RDX: 0000000000040000 RSI: ffffffff816b3cd8 RDI: 0000000000000007 RBP: dffffc0000000000 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000004 R12: 0000000000000000 R13: ffffffff8db93238 R14: ffffffff8db931e0 R15: ffffc9000a817170 console_unlock+0x10c/0x260 kernel/printk/printk.c:3036 vprintk_emit+0x17f/0x5f0 kernel/printk/printk.c:2303 vprintk+0x7b/0x90 kernel/printk/printk_safe.c:45 _printk+0xc8/0x100 kernel/printk/printk.c:2328 __nla_validate_parse+0x6cb/0x2850 lib/nlattr.c:643 __nla_parse+0x40/0x50 lib/nlattr.c:728 __nlmsg_parse include/net/netlink.h:756 [inline] nlmsg_parse_deprecated include/net/netlink.h:797 [inline] __rtnl_newlink+0x1af/0x1930 net/core/rtnetlink.c:3586 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3754 rtnetlink_rcv_msg+0x3c7/0xe00 net/core/rtnetlink.c:6558 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2545 netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline] netlink_unicast+0x53b/0x810 net/netlink/af_netlink.c:1368 netlink_sendmsg+0x939/0xe40 net/netlink/af_netlink.c:1910 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xd5/0x180 net/socket.c:745 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2584 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2638 __sys_sendmsg+0x117/0x1e0 net/socket.c:2667 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:0x7fe7ed67cae9 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:00007fe7ee2f00c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fe7ed79bf80 RCX: 00007fe7ed67cae9 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000005 RBP: 00007fe7ed6c847a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fe7ed79bf80 R15: 00007ffda4882398 ---------------- Code disassembly (best guess): 0: e8 78 8c 23 00 call 0x238c7d 5: 9c pushf 6: 5b pop %rbx 7: 81 e3 00 02 00 00 and $0x200,%ebx d: 31 ff xor %edi,%edi f: 48 89 de mov %rbx,%rsi 12: e8 d6 cd 1c 00 call 0x1ccded 17: 48 85 db test %rbx,%rbx 1a: 0f 85 7c 01 00 00 jne 0x19c 20: e8 38 d2 1c 00 call 0x1cd25d 25: fb sti 26: 48 8b 04 24 mov (%rsp),%rax * 2a: 4c 89 fa mov %r15,%rdx <-- trapping instruction 2d: 83 e2 07 and $0x7,%edx 30: 0f b6 00 movzbl (%rax),%eax 33: 38 d0 cmp %dl,%al 35: 7f 08 jg 0x3f 37: 84 c0 test %al,%al 39: 0f 85 55 02 00 00 jne 0x294 3f: 41 rex.B