================================ WARNING: inconsistent lock state 4.19.106-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-fuzzer/7969 [HC0[0]:SC1[1]:HE1:SE0] takes: 00000000e78293ba (&(&local->client_conns_lock)->rlock){+.?.}, at: spin_lock include/linux/spinlock.h:329 [inline] 00000000e78293ba (&(&local->client_conns_lock)->rlock){+.?.}, at: rxrpc_put_one_client_conn net/rxrpc/conn_client.c:949 [inline] 00000000e78293ba (&(&local->client_conns_lock)->rlock){+.?.}, at: rxrpc_put_client_conn+0x666/0xc00 net/rxrpc/conn_client.c:1002 {SOFTIRQ-ON-W} state was registered at: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] rxrpc_get_client_conn net/rxrpc/conn_client.c:309 [inline] rxrpc_connect_call+0x301/0x4630 net/rxrpc/conn_client.c:702 rxrpc_new_client_call+0x8c6/0x1850 net/rxrpc/call_object.c:291 rxrpc_new_client_call_for_sendmsg net/rxrpc/sendmsg.c:596 [inline] rxrpc_do_sendmsg+0xf2e/0x1bc1 net/rxrpc/sendmsg.c:652 rxrpc_sendmsg+0x4a8/0x5b0 net/rxrpc/af_rxrpc.c:593 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:632 ___sys_sendmsg+0x3e2/0x920 net/socket.c:2115 __sys_sendmmsg+0x195/0x470 net/socket.c:2210 __do_sys_sendmmsg net/socket.c:2239 [inline] __se_sys_sendmmsg net/socket.c:2236 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2236 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe irq event stamp: 3540452 hardirqs last enabled at (3540452): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] hardirqs last enabled at (3540452): [] _raw_spin_unlock_irqrestore+0x67/0xe0 kernel/locking/spinlock.c:184 hardirqs last disabled at (3540451): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (3540451): [] _raw_spin_lock_irqsave+0x66/0xbf kernel/locking/spinlock.c:152 softirqs last enabled at (3540398): [] __do_softirq+0x650/0x93c kernel/softirq.c:318 softirqs last disabled at (3540401): [] invoke_softirq kernel/softirq.c:372 [inline] softirqs last disabled at (3540401): [] irq_exit+0x17b/0x1c0 kernel/softirq.c:412 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&local->client_conns_lock)->rlock); lock(&(&local->client_conns_lock)->rlock); *** DEADLOCK *** 4 locks held by syz-fuzzer/7969: #0: 0000000003315989 (sk_lock-AF_INET){+.+.}, at: lock_sock include/net/sock.h:1506 [inline] #0: 0000000003315989 (sk_lock-AF_INET){+.+.}, at: tcp_sendmsg+0x1d/0x40 net/ipv4/tcp.c:1451 #1: 00000000ed546959 (rcu_read_lock){....}, at: sock_net include/net/sock.h:2427 [inline] #1: 00000000ed546959 (rcu_read_lock){....}, at: __ip_queue_xmit+0x40/0x1bc0 net/ipv4/ip_output.c:430 #2: 00000000ed546959 (rcu_read_lock){....}, at: nf_hook include/linux/netfilter.h:205 [inline] #2: 00000000ed546959 (rcu_read_lock){....}, at: __ip_local_out+0x2c6/0x810 net/ipv4/ip_output.c:113 #3: 00000000f62c1232 (rcu_callback){....}, at: __rcu_reclaim kernel/rcu/rcu.h:226 [inline] #3: 00000000f62c1232 (rcu_callback){....}, at: rcu_do_batch kernel/rcu/tree.c:2584 [inline] #3: 00000000f62c1232 (rcu_callback){....}, at: invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] #3: 00000000f62c1232 (rcu_callback){....}, at: __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] #3: 00000000f62c1232 (rcu_callback){....}, at: rcu_process_callbacks+0xbff/0x17f0 kernel/rcu/tree.c:2881 stack backtrace: CPU: 1 PID: 7969 Comm: syz-fuzzer Not tainted 4.19.106-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 print_usage_bug.cold+0x327/0x425 kernel/locking/lockdep.c:2540 valid_state kernel/locking/lockdep.c:2553 [inline] mark_lock_irq kernel/locking/lockdep.c:2747 [inline] mark_lock+0xc71/0x11b0 kernel/locking/lockdep.c:3127 mark_irqflags kernel/locking/lockdep.c:3005 [inline] __lock_acquire+0xc62/0x49c0 kernel/locking/lockdep.c:3368 lock_acquire+0x170/0x400 kernel/locking/lockdep.c:3903 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] rxrpc_put_one_client_conn net/rxrpc/conn_client.c:949 [inline] rxrpc_put_client_conn+0x666/0xc00 net/rxrpc/conn_client.c:1002 rxrpc_put_connection net/rxrpc/ar-internal.h:951 [inline] rxrpc_rcu_destroy_call+0xb6/0x1e0 net/rxrpc/call_object.c:657 __rcu_reclaim kernel/rcu/rcu.h:236 [inline] rcu_do_batch kernel/rcu/tree.c:2584 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] rcu_process_callbacks+0xb2d/0x17f0 kernel/rcu/tree.c:2881 __do_softirq+0x26c/0x93c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x17b/0x1c0 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:544 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:893 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline] RIP: 0010:lock_acquire+0x1ec/0x400 kernel/locking/lockdep.c:3906 Code: 08 00 00 00 00 00 00 48 c1 e8 03 80 3c 10 00 0f 85 cd 01 00 00 48 83 3d d9 c1 62 07 00 0f 84 38 01 00 00 48 8b 7c 24 08 57 9d <0f> 1f 44 00 00 48 83 c4 20 5b 5d 41 5c 41 5d 41 5e 41 5f c3 65 8b RSP: 0018:ffff888084797510 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff1164ac1 RBX: ffff888082be6680 RCX: 00000000b8cffd39 RDX: dffffc0000000000 RSI: 0000000000000000 RDI: 0000000000000282 RBP: ffffffff88b92960 R08: 0000000000000000 R09: 0000000000000002 R10: ffff888082be6f50 R11: 00000000521049b4 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000002 R15: dffffc0000000000 rcu_lock_acquire include/linux/rcupdate.h:242 [inline] rcu_read_lock include/linux/rcupdate.h:627 [inline] nf_hook include/linux/netfilter.h:208 [inline] __ip_local_out+0x2f5/0x810 net/ipv4/ip_output.c:113 ip_local_out+0x26/0x170 net/ipv4/ip_output.c:122 __ip_queue_xmit+0x85a/0x1bc0 net/ipv4/ip_output.c:505 __tcp_transmit_skb+0x19d5/0x3750 net/ipv4/tcp_output.c:1146 tcp_transmit_skb net/ipv4/tcp_output.c:1162 [inline] tcp_write_xmit+0x1409/0x5230 net/ipv4/tcp_output.c:2387 __tcp_push_pending_frames+0xaa/0x260 net/ipv4/tcp_output.c:2563 tcp_push+0x4c2/0x6c0 net/ipv4/tcp.c:735 tcp_sendmsg_locked+0x271b/0x2ff0 net/ipv4/tcp.c:1422 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1452 inet_sendmsg+0x12e/0x590 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:632 sock_write_iter+0x283/0x3c0 net/socket.c:901 call_write_iter include/linux/fs.h:1820 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x512/0x760 fs/read_write.c:487 vfs_write+0x206/0x550 fs/read_write.c:549 ksys_write+0x12b/0x2a0 fs/read_write.c:599 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x47c530 Code: 8b 7c 24 10 48 8b 74 24 18 48 8b 54 24 20 49 c7 c2 00 00 00 00 49 c7 c0 00 00 00 00 49 c7 c1 00 00 00 00 48 8b 44 24 08 0f 05 <48> 3d 01 f0 ff ff 76 20 48 c7 44 24 28 ff ff ff ff 48 c7 44 24 30 RSP: 002b:000000c437119350 EFLAGS: 00000206 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000047c530 RDX: 00000000000000f0 RSI: 000000c4202d6200 RDI: 0000000000000003 RBP: 000000c4371193a8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 000000c4200c5b00 R13: 000000000000007f R14: 0000000000c9e6a0 R15: ffffffffffff344d netlink: 20 bytes leftover after parsing attributes in process `syz-executor.0'. ip6_tunnel: ip6gretap0 xmit: Local address not yet configured! ip6_tunnel: ip6gretap0 xmit: Local address not yet configured! ip6_tunnel: ip6gretap0 xmit: Local address not yet configured! ip6_tunnel: ip6gretap0 xmit: Local address not yet configured! ip6_tunnel: ip6gretap0 xmit: Local address not yet configured! ip6_tunnel: ip6gretap0 xmit: Local address not yet configured! input: syz0 as /devices/virtual/input/input19 usb usb7: usbfs: process 17841 (syz-executor.1) did not claim interface 0 before use usb usb7: usbfs: process 17841 (syz-executor.1) did not claim interface 0 before use usb usb7: usbfs: process 17858 (syz-executor.1) did not claim interface 0 before use usb usb7: usbfs: process 17881 (syz-executor.1) did not claim interface 0 before use usb usb7: usbfs: process 17890 (syz-executor.2) did not claim interface 0 before use usb usb7: usbfs: process 17894 (syz-executor.1) did not claim interface 0 before use usb usb7: usbfs: process 17900 (syz-executor.3) did not claim interface 0 before use usb usb7: usbfs: process 17904 (syz-executor.5) did not claim interface 0 before use usb usb7: usbfs: process 17909 (syz-executor.2) did not claim interface 0 before use usb usb7: usbfs: process 17921 (syz-executor.5) did not claim interface 0 before use usb usb7: usbfs: process 17923 (syz-executor.3) did not claim interface 0 before use usb usb7: usbfs: process 17929 (syz-executor.2) did not claim interface 0 before use usb usb7: usbfs: process 17932 (syz-executor.5) did not claim interface 0 before use usb usb7: usbfs: process 17936 (syz-executor.3) did not claim interface 0 before use ubi0: attaching mtd0 Cannot find set identified by id 0 to match ubi0: scanning is finished ubi0: empty MTD device detected Cannot find set identified by id 0 to match ubi0: attached mtd0 (name "mtdram test device", size 0 MiB) ubi0: PEB size: 4096 bytes (4 KiB), LEB size: 3968 bytes ubi0: min./max. I/O unit sizes: 1/64, sub-page size 1 ubi0: VID header offset: 64 (aligned 64), data offset: 128 ubi0: good PEBs: 32, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 23 ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 2467662818 ubi0: available PEBs: 28, total reserved PEBs: 4, PEBs reserved for bad PEB handling: 0 ubi0: background thread "ubi_bgt0d" started, PID 17969 ubi0: detaching mtd0 ubi0: mtd0 is detached ubi0: attaching mtd0 ubi0: scanning is finished ubi0: attached mtd0 (name "mtdram test device", size 0 MiB) ubi0: PEB size: 4096 bytes (4 KiB), LEB size: 3968 bytes ubi0: min./max. I/O unit sizes: 1/64, sub-page size 1 ubi0: VID header offset: 64 (aligned 64), data offset: 128 ubi0: good PEBs: 32, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 23 ubi0: max/mean erase counter: 1/1, WL threshold: 4096, image sequence number: 2467662818 ubi0: available PEBs: 28, total reserved PEBs: 4, PEBs reserved for bad PEB handling: 0 ubi0: background thread "ubi_bgt0d" started, PID 17986 ubi0: detaching mtd0 ubi0: mtd0 is detached ubi0: attaching mtd0 ubi0: scanning is finished ubi0: attached mtd0 (name "mtdram test device", size 0 MiB) ubi0: PEB size: 4096 bytes (4 KiB), LEB size: 3968 bytes ubi0: min./max. I/O unit sizes: 1/64, sub-page size 1 ubi0: VID header offset: 64 (aligned 64), data offset: 128 ubi0: good PEBs: 32, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 23 ubi0: max/mean erase counter: 1/1, WL threshold: 4096, image sequence number: 2467662818 ubi0: available PEBs: 28, total reserved PEBs: 4, PEBs reserved for bad PEB handling: 0 ubi0: background thread "ubi_bgt0d" started, PID 18018 ubi0: detaching mtd0 ubi0: mtd0 is detached ubi0: attaching mtd0 ubi0: scanning is finished caif:caif_disconnect_client(): nothing to disconnect caif:caif_disconnect_client(): nothing to disconnect ubi0: attached mtd0 (name "mtdram test device", size 0 MiB) ubi0: PEB size: 4096 bytes (4 KiB), LEB size: 3968 bytes ubi0: min./max. I/O unit sizes: 1/64, sub-page size 1 ubi0: VID header offset: 64 (aligned 64), data offset: 128 ubi0: good PEBs: 32, bad PEBs: 0, corrupted PEBs: 0 ubi0: user volume: 0, internal volumes: 1, max. volumes count: 23 ubi0: max/mean erase counter: 1/1, WL threshold: 4096, image sequence number: 2467662818 ubi0: available PEBs: 28, total reserved PEBs: 4, PEBs reserved for bad PEB handling: 0 ubi0: background thread "ubi_bgt0d" started, PID 18055 caif:caif_disconnect_client(): nothing to disconnect