================================ WARNING: inconsistent lock state 4.14.171-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.1/7299 [HC0[0]:SC1[1]:HE1:SE0] takes: (rxrpc_conn_id_lock){+.?.}, at: [] spin_lock include/linux/spinlock.h:317 [inline] (rxrpc_conn_id_lock){+.?.}, at: [] rxrpc_put_client_connection_id.part.0+0x19/0x70 net/rxrpc/conn_client.c:143 {SOFTIRQ-ON-W} state was registered at: mark_irqflags kernel/locking/lockdep.c:3086 [inline] __lock_acquire+0xc33/0x4620 kernel/locking/lockdep.c:3444 lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3994 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:152 spin_lock include/linux/spinlock.h:317 [inline] rxrpc_get_client_connection_id net/rxrpc/conn_client.c:114 [inline] rxrpc_alloc_client_connection net/rxrpc/conn_client.c:198 [inline] rxrpc_get_client_conn net/rxrpc/conn_client.c:342 [inline] rxrpc_connect_call+0x8a5/0x41a0 net/rxrpc/conn_client.c:692 rxrpc_new_client_call+0x8f7/0x1420 net/rxrpc/call_object.c:276 rxrpc_new_client_call_for_sendmsg net/rxrpc/sendmsg.c:525 [inline] rxrpc_do_sendmsg+0x92a/0x1109 net/rxrpc/sendmsg.c:577 rxrpc_sendmsg+0x4d1/0x610 net/rxrpc/af_rxrpc.c:543 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xce/0x110 net/socket.c:656 ___sys_sendmsg+0x349/0x840 net/socket.c:2062 __sys_sendmmsg+0x152/0x3a0 net/socket.c:2152 SYSC_sendmmsg net/socket.c:2183 [inline] SyS_sendmmsg+0x35/0x60 net/socket.c:2178 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 irq event stamp: 7963152 hardirqs last enabled at (7963152): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] hardirqs last enabled at (7963152): [] _raw_spin_unlock_irqrestore+0x6b/0xe0 kernel/locking/spinlock.c:192 hardirqs last disabled at (7963151): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (7963151): [] _raw_spin_lock_irqsave+0x6f/0xcd kernel/locking/spinlock.c:160 softirqs last enabled at (7962950): [] spin_unlock_bh include/linux/spinlock.h:362 [inline] softirqs last enabled at (7962950): [] release_sock+0x14a/0x1b0 net/core/sock.c:2790 softirqs last disabled at (7963121): [] invoke_softirq kernel/softirq.c:368 [inline] softirqs last disabled at (7963121): [] irq_exit+0x160/0x1b0 kernel/softirq.c:409 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(rxrpc_conn_id_lock); lock(rxrpc_conn_id_lock); *** DEADLOCK *** 3 locks held by syz-executor.1/7299: #0: (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x3c/0x3d0 net/netfilter/x_tables.c:1092 #1: (pgd_lock){+.+.}, at: [] spin_lock include/linux/spinlock.h:317 [inline] #1: (pgd_lock){+.+.}, at: [] sync_global_pgds+0xe3/0x400 arch/x86/mm/init_64.c:152 #2: (rcu_callback){....}, at: [] __rcu_reclaim kernel/rcu/rcu.h:185 [inline] #2: (rcu_callback){....}, at: [] rcu_do_batch kernel/rcu/tree.c:2699 [inline] #2: (rcu_callback){....}, at: [] invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline] #2: (rcu_callback){....}, at: [] __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline] #2: (rcu_callback){....}, at: [] rcu_process_callbacks+0x893/0x12b0 kernel/rcu/tree.c:2946 stack backtrace: CPU: 1 PID: 7299 Comm: syz-executor.1 Not tainted 4.14.171-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x142/0x197 lib/dump_stack.c:58 print_usage_bug.cold+0x330/0x42a kernel/locking/lockdep.c:2585 valid_state kernel/locking/lockdep.c:2598 [inline] mark_lock_irq kernel/locking/lockdep.c:2792 [inline] mark_lock+0xdbd/0x1240 kernel/locking/lockdep.c:3190 mark_irqflags kernel/locking/lockdep.c:3068 [inline] __lock_acquire+0xb57/0x4620 kernel/locking/lockdep.c:3444 lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3994 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:152 spin_lock include/linux/spinlock.h:317 [inline] rxrpc_put_client_connection_id.part.0+0x19/0x70 net/rxrpc/conn_client.c:143 rxrpc_put_client_connection_id include/linux/spinlock.h:358 [inline] rxrpc_put_one_client_conn net/rxrpc/conn_client.c:912 [inline] rxrpc_put_client_conn+0x564/0xaa0 net/rxrpc/conn_client.c:957 rxrpc_put_connection net/rxrpc/ar-internal.h:862 [inline] rxrpc_rcu_destroy_call+0x88/0x190 net/rxrpc/call_object.c:642 __rcu_reclaim kernel/rcu/rcu.h:195 [inline] rcu_do_batch kernel/rcu/tree.c:2699 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2962 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2929 [inline] rcu_process_callbacks+0x7b8/0x12b0 kernel/rcu/tree.c:2946 __do_softirq+0x244/0x9a0 kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x160/0x1b0 kernel/softirq.c:409 exiting_irq arch/x86/include/asm/apic.h:648 [inline] smp_apic_timer_interrupt+0x146/0x5e0 arch/x86/kernel/apic/apic.c:1102 apic_timer_interrupt+0x96/0xa0 arch/x86/entry/entry_64.S:792 RIP: 0010:debug_spin_unlock kernel/locking/spinlock_debug.c:97 [inline] RIP: 0010:do_raw_spin_unlock+0x1e/0x260 kernel/locking/spinlock_debug.c:134 RSP: 0018:ffff88805b14fa10 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff10 RAX: dffffc0000000000 RBX: ffffea000229c7c0 RCX: 1ffff1100b628d0e RDX: ffff888089aa60fc RSI: 0000000000000003 RDI: ffff888089aa60fc RBP: ffff88805b14fa28 R08: ffff88805b146000 R09: 0000000000000002 R10: 0000000000000000 R11: ffff88805b146000 R12: ffff888089aa60f8 R13: ffff888089aa60f8 R14: 00003ffffffff000 R15: dffffc0000000000 __raw_spin_unlock include/linux/spinlock_api_smp.h:151 [inline] _raw_spin_unlock+0x23/0x50 kernel/locking/spinlock.c:184 spin_unlock include/linux/spinlock.h:357 [inline] sync_global_pgds+0x194/0x400 arch/x86/mm/init_64.c:171 vmalloc_sync_all+0x22/0x30 arch/x86/mm/fault.c:406 __vmalloc_node_range+0x383/0x6a0 mm/vmalloc.c:1772 __vmalloc_node mm/vmalloc.c:1815 [inline] __vmalloc_node_flags mm/vmalloc.c:1829 [inline] vzalloc+0x46/0x50 mm/vmalloc.c:1868 alloc_counters.isra.0+0x48/0x90 net/ipv6/netfilter/ip6_tables.c:818 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:840 [inline] get_entries net/ipv6/netfilter/ip6_tables.c:1044 [inline] do_ip6t_get_ctl+0x439/0x820 net/ipv6/netfilter/ip6_tables.c:1713 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x6a/0xc0 net/netfilter/nf_sockopt.c:122 ipv6_getsockopt net/ipv6/ipv6_sockglue.c:1369 [inline] ipv6_getsockopt+0x182/0x1f0 net/ipv6/ipv6_sockglue.c:1349 tcp_getsockopt net/ipv4/tcp.c:3255 [inline] tcp_getsockopt+0x84/0xd0 net/ipv4/tcp.c:3249 sock_common_getsockopt+0x94/0xd0 net/core/sock.c:2927 SYSC_getsockopt net/socket.c:1896 [inline] SyS_getsockopt+0x126/0x1e0 net/socket.c:1878 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45ef3a RSP: 002b:00007fff26977028 EFLAGS: 00000212 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00007fff26977050 RCX: 000000000045ef3a RDX: 0000000000000041 RSI: 0000000000000029 RDI: 0000000000000003 RBP: 000000000071dcc0 R08: 00007fff2697704c R09: 0000000000004000 R10: 00007fff26977150 R11: 0000000000000212 R12: 0000000000000003 R13: 0000000000000000 R14: 0000000000000029 R15: 000000000071c880