================================ WARNING: inconsistent lock state 4.19.104-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. udevd/25670 [HC0[0]:SC1[1]:HE1:SE0] takes: 0000000005c71b9f (rxrpc_conn_id_lock){+.?.}, at: spin_lock include/linux/spinlock.h:329 [inline] 0000000005c71b9f (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: lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3903 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [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:345 [inline] rxrpc_connect_call+0x948/0x4920 net/rxrpc/conn_client.c:702 rxrpc_new_client_call+0x8e7/0x1880 net/rxrpc/call_object.c:291 rxrpc_new_client_call_for_sendmsg net/rxrpc/sendmsg.c:596 [inline] rxrpc_do_sendmsg+0xfc3/0x1ca3 net/rxrpc/sendmsg.c:652 rxrpc_sendmsg+0x4a0/0x5b0 net/rxrpc/af_rxrpc.c:593 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:632 ___sys_sendmsg+0x3e2/0x920 net/socket.c:2115 __sys_sendmmsg+0x1bf/0x4e0 net/socket.c:2210 __do_sys_sendmmsg net/socket.c:2239 [inline] __se_sys_sendmmsg net/socket.c:2236 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2236 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe irq event stamp: 10465518 hardirqs last enabled at (10465518): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] hardirqs last enabled at (10465518): [] _raw_spin_unlock_irqrestore+0x6b/0xe0 kernel/locking/spinlock.c:184 hardirqs last disabled at (10465517): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (10465517): [] _raw_spin_lock_irqsave+0x6f/0xcd kernel/locking/spinlock.c:152 softirqs last enabled at (10463834): [] __do_softirq+0x633/0x921 kernel/softirq.c:318 softirqs last disabled at (10465295): [] invoke_softirq kernel/softirq.c:372 [inline] softirqs last disabled at (10465295): [] irq_exit+0x180/0x1d0 kernel/softirq.c:412 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(rxrpc_conn_id_lock); lock(rxrpc_conn_id_lock); *** DEADLOCK *** 5 locks held by udevd/25670: #0: 000000000c3bef80 (&dup_mmap_sem){++++}, at: dup_mmap kernel/fork.c:435 [inline] #0: 000000000c3bef80 (&dup_mmap_sem){++++}, at: dup_mm kernel/fork.c:1288 [inline] #0: 000000000c3bef80 (&dup_mmap_sem){++++}, at: copy_mm kernel/fork.c:1344 [inline] #0: 000000000c3bef80 (&dup_mmap_sem){++++}, at: copy_process.part.0+0x2b90/0x7a60 kernel/fork.c:1897 #1: 00000000deed63f7 (&mm->mmap_sem){++++}, at: dup_mmap kernel/fork.c:436 [inline] #1: 00000000deed63f7 (&mm->mmap_sem){++++}, at: dup_mm kernel/fork.c:1288 [inline] #1: 00000000deed63f7 (&mm->mmap_sem){++++}, at: copy_mm kernel/fork.c:1344 [inline] #1: 00000000deed63f7 (&mm->mmap_sem){++++}, at: copy_process.part.0+0x2bac/0x7a60 kernel/fork.c:1897 #2: 00000000c1d55f44 (&mm->mmap_sem/1){+.+.}, at: dup_mmap kernel/fork.c:445 [inline] #2: 00000000c1d55f44 (&mm->mmap_sem/1){+.+.}, at: dup_mm kernel/fork.c:1288 [inline] #2: 00000000c1d55f44 (&mm->mmap_sem/1){+.+.}, at: copy_mm kernel/fork.c:1344 [inline] #2: 00000000c1d55f44 (&mm->mmap_sem/1){+.+.}, at: copy_process.part.0+0x2bf9/0x7a60 kernel/fork.c:1897 #3: 00000000c280412f (&selinux_ss.policy_rwlock){.+.?}, at: security_compute_av+0x67/0xb70 security/selinux/ss/services.c:1119 #4: 000000003da4b12f (rcu_callback){....}, at: __rcu_reclaim kernel/rcu/rcu.h:226 [inline] #4: 000000003da4b12f (rcu_callback){....}, at: rcu_do_batch kernel/rcu/tree.c:2584 [inline] #4: 000000003da4b12f (rcu_callback){....}, at: invoke_rcu_callbacks kernel/rcu/tree.c:2897 [inline] #4: 000000003da4b12f (rcu_callback){....}, at: __rcu_process_callbacks kernel/rcu/tree.c:2864 [inline] #4: 000000003da4b12f (rcu_callback){....}, at: rcu_process_callbacks+0xc79/0x1a30 kernel/rcu/tree.c:2881 stack backtrace: CPU: 0 PID: 25670 Comm: udevd Not tainted 4.19.104-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+0x197/0x210 lib/dump_stack.c:118 print_usage_bug.cold+0x330/0x42a kernel/locking/lockdep.c:2540 valid_state kernel/locking/lockdep.c:2553 [inline] mark_lock_irq kernel/locking/lockdep.c:2747 [inline] mark_lock+0xd1b/0x1370 kernel/locking/lockdep.c:3127 mark_irqflags kernel/locking/lockdep.c:3005 [inline] __lock_acquire+0xc62/0x49c0 kernel/locking/lockdep.c:3368 lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3903 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [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:370 [inline] rxrpc_put_one_client_conn net/rxrpc/conn_client.c:956 [inline] rxrpc_put_client_conn+0x6c6/0xc20 net/rxrpc/conn_client.c:1002 rxrpc_put_connection net/rxrpc/ar-internal.h:951 [inline] rxrpc_rcu_destroy_call+0xbd/0x200 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+0xba0/0x1a30 kernel/rcu/tree.c:2881 __do_softirq+0x25c/0x921 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:544 [inline] smp_apic_timer_interrupt+0x13b/0x550 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:893 RIP: 0010:avtab_hash security/selinux/ss/avtab.c:53 [inline] RIP: 0010:avtab_search_node+0xf2/0x550 security/selinux/ss/avtab.c:228 Code: 48 8d 48 04 48 b8 00 00 00 00 00 fc ff df 48 89 ca 48 89 4d b0 48 c1 ea 03 0f b6 14 02 48 89 c8 83 e0 07 83 c0 01 38 d0 7c 08 <84> d2 0f 85 12 04 00 00 48 8b 4d d0 0f b7 41 04 48 83 c1 02 48 89 RSP: 0018:ffff888042caf658 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000005 RBX: ffffffff8ad99550 RCX: ffff888042caf7cc RDX: 0000000000000000 RSI: 0000000000001fff RDI: ffffffff8ad99560 RBP: ffff888042caf6b8 R08: ffff8880a17c6580 R09: ffff888042caf97c R10: ffffed1008595f33 R11: ffff888042caf99b R12: ffff888099a60b40 R13: ffff8880994576c0 R14: dffffc0000000000 R15: ffff888042caf7c8 context_struct_compute_av+0x6c9/0x1590 security/selinux/ss/services.c:667 security_compute_av+0x40b/0xb70 security/selinux/ss/services.c:1152 avc_compute_av+0xf4/0x690 security/selinux/avc.c:1024 avc_has_perm_noaudit+0x324/0x570 security/selinux/avc.c:1167 cred_has_capability+0x16a/0x320 security/selinux/hooks.c:1822 selinux_vm_enough_memory+0x51/0x70 security/selinux/hooks.c:2419 security_vm_enough_memory_mm+0x4b/0xc0 security/security.c:328 dup_mmap kernel/fork.c:485 [inline] dup_mm kernel/fork.c:1288 [inline] copy_mm kernel/fork.c:1344 [inline] copy_process.part.0+0x340b/0x7a60 kernel/fork.c:1897 copy_process kernel/fork.c:1694 [inline] _do_fork+0x257/0xfd0 kernel/fork.c:2207 __do_sys_clone kernel/fork.c:2314 [inline] __se_sys_clone kernel/fork.c:2308 [inline] __x64_sys_clone+0xbf/0x150 kernel/fork.c:2308 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f344e098f46 Code: f7 d8 64 89 04 25 d4 02 00 00 64 4c 8b 14 25 10 00 00 00 31 d2 49 81 c2 d0 02 00 00 31 f6 bf 11 00 20 01 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 31 01 00 00 85 c0 41 89 c4 0f 85 3b 01 00 RSP: 002b:00007fff6fa54e80 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 00007fff6fa54e80 RCX: 00007f344e098f46 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011 RBP: 00007fff6fa54ee0 R08: 0000000000006446 R09: 0000000000006446 R10: 00007f344e9b5a70 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff6fa54ea0 R14: 0000000000000005 R15: 0000000000000005 kauditd_printk_skb: 159 callbacks suppressed audit: type=1400 audit(2000001364.455:64432): avc: denied { map } for pid=2714 comm="blkid" path="/etc/ld.so.cache" dev="sda1" ino=2251 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001364.505:64433): avc: denied { map } for pid=2714 comm="blkid" path="/lib/x86_64-linux-gnu/libblkid.so.1.1.0" dev="sda1" ino=2825 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001364.505:64434): avc: denied { map } for pid=2714 comm="blkid" path="/lib/x86_64-linux-gnu/libblkid.so.1.1.0" dev="sda1" ino=2825 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001364.505:64435): avc: denied { write } for pid=2701 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(2000001364.505:64436): avc: denied { map } for pid=2714 comm="blkid" path="/lib/x86_64-linux-gnu/libc-2.13.so" dev="sda1" ino=2784 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001364.515:64437): avc: denied { map } for pid=2714 comm="blkid" path="/lib/x86_64-linux-gnu/libc-2.13.so" dev="sda1" ino=2784 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001364.525:64438): avc: denied { map } for pid=2714 comm="blkid" path="/lib/x86_64-linux-gnu/libuuid.so.1.3.0" dev="sda1" ino=2819 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001364.565:64439): avc: denied { map } for pid=2714 comm="blkid" path="/lib/x86_64-linux-gnu/libuuid.so.1.3.0" dev="sda1" ino=2819 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001365.025:64440): avc: denied { map } for pid=2817 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001365.025:64441): avc: denied { map } for pid=2817 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 kauditd_printk_skb: 234 callbacks suppressed audit: type=1400 audit(2000001369.465:64676): avc: denied { map } for pid=2908 comm="blkid" path="/etc/ld.so.cache" dev="sda1" ino=2251 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001369.475:64677): avc: denied { map } for pid=2908 comm="blkid" path="/lib/x86_64-linux-gnu/libblkid.so.1.1.0" dev="sda1" ino=2825 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001369.475:64678): avc: denied { map } for pid=2908 comm="blkid" path="/lib/x86_64-linux-gnu/libblkid.so.1.1.0" dev="sda1" ino=2825 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001369.525:64679): avc: denied { map } for pid=2908 comm="blkid" path="/lib/x86_64-linux-gnu/libc-2.13.so" dev="sda1" ino=2784 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001369.535:64680): avc: denied { map } for pid=2908 comm="blkid" path="/lib/x86_64-linux-gnu/libc-2.13.so" dev="sda1" ino=2784 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001369.535:64681): avc: denied { map } for pid=2910 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001369.545:64682): avc: denied { map } for pid=2910 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001369.545:64683): avc: denied { create } for pid=2909 comm="syz-executor.4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(2000001369.565:64684): avc: denied { map } for pid=2910 comm="blkid" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: type=1400 audit(2000001369.575:64685): avc: denied { map } for pid=2910 comm="blkid" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1