================================ WARNING: inconsistent lock state 6.1.0-rc6-syzkaller-00015-gc3eb11fbb826 #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-R} -> {SOFTIRQ-ON-W} usage. syz-executor.3/13614 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff8880477b9bb8 (clock-AF_INET6){+++-}-{2:2}, at: l2tp_tunnel_register+0x9e6/0x1ae0 net/l2tp/l2tp_core.c:1477 {IN-SOFTIRQ-R} state was registered at: lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 __raw_read_lock_bh include/linux/rwlock_api_smp.h:176 [inline] _raw_read_lock_bh+0x39/0x50 kernel/locking/spinlock.c:252 rds_tcp_write_space+0x30/0x520 net/rds/tcp_send.c:184 tcp_new_space net/ipv4/tcp_input.c:5471 [inline] tcp_check_space+0x35d/0x4f0 net/ipv4/tcp_input.c:5490 tcp_write_xmit+0x1aff/0x65a0 net/ipv4/tcp_output.c:2703 tcp_tsq_handler+0x162/0x1f0 net/ipv4/tcp_output.c:1030 tcp_tasklet_func+0x4dc/0x560 net/ipv4/tcp_output.c:1062 tasklet_action_common+0x3da/0x590 kernel/softirq.c:797 __do_softirq+0x277/0x75b kernel/softirq.c:571 run_ksoftirqd+0xc1/0x120 kernel/softirq.c:934 smpboot_thread_fn+0x533/0xa10 kernel/smpboot.c:164 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 irq event stamp: 449 hardirqs last enabled at (449): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline] hardirqs last enabled at (449): [] _raw_spin_unlock_irqrestore+0x8b/0x130 kernel/locking/spinlock.c:194 hardirqs last disabled at (448): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (448): [] _raw_spin_lock_irqsave+0xac/0x120 kernel/locking/spinlock.c:162 softirqs last enabled at (444): [] local_bh_enable+0x5/0x20 include/linux/bottom_half.h:32 softirqs last disabled at (442): [] local_bh_disable+0x5/0x20 include/linux/bottom_half.h:19 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(clock-AF_INET6); lock(clock-AF_INET6); *** DEADLOCK *** 1 lock held by syz-executor.3/13614: #0: ffff8881473be130 (sk_lock-AF_PPPOX){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1721 [inline] #0: ffff8881473be130 (sk_lock-AF_PPPOX){+.+.}-{0:0}, at: pppol2tp_connect+0x63c/0x1750 net/l2tp/l2tp_ppp.c:675 stack backtrace: CPU: 1 PID: 13614 Comm: syz-executor.3 Not tainted 6.1.0-rc6-syzkaller-00015-gc3eb11fbb826 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 mark_lock_irq+0xb2a/0xf10 mark_lock+0x21e/0x350 kernel/locking/lockdep.c:4634 __lock_acquire+0xc61/0x1f60 kernel/locking/lockdep.c:5009 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 __raw_write_lock include/linux/rwlock_api_smp.h:209 [inline] _raw_write_lock+0x2a/0x40 kernel/locking/spinlock.c:300 l2tp_tunnel_register+0x9e6/0x1ae0 net/l2tp/l2tp_core.c:1477 pppol2tp_connect+0xb73/0x1750 net/l2tp/l2tp_ppp.c:723 __sys_connect_file net/socket.c:1976 [inline] __sys_connect+0x29b/0x2d0 net/socket.c:1993 __do_sys_connect net/socket.c:2003 [inline] __se_sys_connect net/socket.c:2000 [inline] __x64_sys_connect+0x76/0x80 net/socket.c:2000 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7effe7c8c0d9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007effe8a0f168 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007effe7dabf80 RCX: 00007effe7c8c0d9 RDX: 000000000000002e RSI: 0000000020000000 RDI: 0000000000000005 RBP: 00007effe7ce7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff1cc40f5f R14: 00007effe8a0f300 R15: 0000000000022000 BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 13614, name: syz-executor.3 preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 INFO: lockdep is turned off. Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 13614 Comm: syz-executor.3 Not tainted 6.1.0-rc6-syzkaller-00015-gc3eb11fbb826 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 __might_resched+0x538/0x6a0 kernel/sched/core.c:9908 percpu_down_read include/linux/percpu-rwsem.h:49 [inline] cpus_read_lock+0x17/0x130 kernel/cpu.c:310 static_key_slow_inc+0xe/0x20 kernel/jump_label.c:158 udp_tunnel_encap_enable include/net/udp_tunnel.h:187 [inline] setup_udp_tunnel_sock+0x368/0x460 net/ipv4/udp_tunnel_core.c:81 l2tp_tunnel_register+0x1278/0x1ae0 net/l2tp/l2tp_core.c:1509 pppol2tp_connect+0xb73/0x1750 net/l2tp/l2tp_ppp.c:723 __sys_connect_file net/socket.c:1976 [inline] __sys_connect+0x29b/0x2d0 net/socket.c:1993 __do_sys_connect net/socket.c:2003 [inline] __se_sys_connect net/socket.c:2000 [inline] __x64_sys_connect+0x76/0x80 net/socket.c:2000 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7effe7c8c0d9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007effe8a0f168 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00007effe7dabf80 RCX: 00007effe7c8c0d9 RDX: 000000000000002e RSI: 0000000020000000 RDI: 0000000000000005 RBP: 00007effe7ce7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff1cc40f5f R14: 00007effe8a0f300 R15: 0000000000022000