================================ WARNING: inconsistent lock state 5.5.0-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. udevd/4193 [HC0[0]:SC1[1]:HE1:SE0] takes: ffff88808dd1e9c8 (&(&local->client_conns_lock)->rlock){+.?.}, at: spin_lock include/linux/spinlock.h:338 [inline] ffff88808dd1e9c8 (&(&local->client_conns_lock)->rlock){+.?.}, at: rxrpc_put_one_client_conn net/rxrpc/conn_client.c:948 [inline] ffff88808dd1e9c8 (&(&local->client_conns_lock)->rlock){+.?.}, at: rxrpc_put_client_conn+0x6ed/0xc90 net/rxrpc/conn_client.c:1001 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4484 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:338 [inline] rxrpc_get_client_conn net/rxrpc/conn_client.c:304 [inline] rxrpc_connect_call+0x358/0x4e30 net/rxrpc/conn_client.c:701 rxrpc_new_client_call+0x9c0/0x1ad0 net/rxrpc/call_object.c:290 rxrpc_new_client_call_for_sendmsg net/rxrpc/sendmsg.c:595 [inline] rxrpc_do_sendmsg+0xffa/0x1d5f net/rxrpc/sendmsg.c:652 rxrpc_sendmsg+0x4d6/0x5f0 net/rxrpc/af_rxrpc.c:586 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 ____sys_sendmsg+0x358/0x880 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmmsg+0x1bf/0x4d0 net/socket.c:2487 __do_sys_sendmmsg net/socket.c:2516 [inline] __se_sys_sendmmsg net/socket.c:2513 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2513 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe irq event stamp: 2039034 hardirqs last enabled at (2039034): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] hardirqs last enabled at (2039034): [] _raw_spin_unlock_irqrestore+0x66/0xe0 kernel/locking/spinlock.c:191 hardirqs last disabled at (2039033): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (2039033): [] _raw_spin_lock_irqsave+0x6f/0xcd kernel/locking/spinlock.c:159 softirqs last enabled at (2037902): [] __do_softirq+0x6cd/0x98c kernel/softirq.c:319 softirqs last disabled at (2039007): [] invoke_softirq kernel/softirq.c:373 [inline] softirqs last disabled at (2039007): [] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 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 *** 2 locks held by udevd/4193: #0: ffffffff8a012548 (tomoyo_ss){....}, at: tomoyo_check_open_permission+0xfe/0x3e0 security/tomoyo/file.c:761 #1: ffffffff89babe80 (rcu_callback){....}, at: rcu_do_batch kernel/rcu/tree.c:2176 [inline] #1: ffffffff89babe80 (rcu_callback){....}, at: rcu_core+0x562/0x1390 kernel/rcu/tree.c:2410 stack backtrace: CPU: 1 PID: 4193 Comm: udevd Not tainted 5.5.0-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+0x327/0x378 kernel/locking/lockdep.c:3100 valid_state kernel/locking/lockdep.c:3111 [inline] mark_lock_irq kernel/locking/lockdep.c:3308 [inline] mark_lock+0xbb4/0x1220 kernel/locking/lockdep.c:3665 mark_usage kernel/locking/lockdep.c:3565 [inline] __lock_acquire+0x1e8e/0x4a00 kernel/locking/lockdep.c:3908 lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4484 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:338 [inline] rxrpc_put_one_client_conn net/rxrpc/conn_client.c:948 [inline] rxrpc_put_client_conn+0x6ed/0xc90 net/rxrpc/conn_client.c:1001 rxrpc_put_connection net/rxrpc/ar-internal.h:965 [inline] rxrpc_rcu_destroy_call+0xbd/0x200 net/rxrpc/call_object.c:572 rcu_do_batch kernel/rcu/tree.c:2186 [inline] rcu_core+0x5e1/0x1390 kernel/rcu/tree.c:2410 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2419 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:tomoyo_check_acl+0xc7/0x3e0 security/tomoyo/domain.c:173 Code: e7 0f fe 48 8d 7b 18 48 89 f8 48 89 fa 48 c1 e8 03 83 e2 07 42 0f b6 04 20 38 d0 7f 08 84 c0 0f 85 a8 02 00 00 44 0f b6 6b 18 <31> ff 44 89 ee e8 8f e8 0f fe 45 84 ed 0f 85 5e 01 00 00 e8 41 e7 RSP: 0018:ffffc900019a75f8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: ffff8880a83e1480 RCX: ffffffff83658f57 RDX: 0000000000000000 RSI: ffffffff83658ed0 RDI: ffff8880a83e1498 RBP: ffffc900019a7650 R08: ffff8880945d6200 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: dffffc0000000000 R13: 0000000000000000 R14: ffffc900019a7710 R15: 0000000000000000 tomoyo_path_permission security/tomoyo/file.c:586 [inline] tomoyo_path_permission+0x1fb/0x360 security/tomoyo/file.c:573 tomoyo_check_open_permission+0x3a6/0x3e0 security/tomoyo/file.c:777 tomoyo_file_open security/tomoyo/tomoyo.c:319 [inline] tomoyo_file_open+0xa9/0xd0 security/tomoyo/tomoyo.c:314 security_file_open+0x71/0x300 security/security.c:1529 do_dentry_open+0x37a/0x1380 fs/open.c:784 vfs_open+0xa0/0xd0 fs/open.c:914 do_last fs/namei.c:3490 [inline] path_openat+0x12f3/0x3460 fs/namei.c:3607 do_filp_open+0x192/0x260 fs/namei.c:3637 do_sys_openat2+0x5eb/0x7e0 fs/open.c:1149 do_sys_open+0xf2/0x180 fs/open.c:1165 ksys_open include/linux/syscalls.h:1386 [inline] __do_sys_open fs/open.c:1171 [inline] __se_sys_open fs/open.c:1169 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1169 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f3db8ae1120 Code: 48 8b 15 1b 4d 2b 00 f7 d8 64 89 02 83 c8 ff c3 90 90 90 90 90 90 90 90 90 90 83 3d d5 a4 2b 00 00 75 10 b8 02 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 5e 8c 01 00 48 89 04 24 RSP: 002b:00007ffc98443518 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 0000000001eaa1d0 RCX: 00007f3db8ae1120 RDX: 00000000000001b6 RSI: 0000000000080000 RDI: 00007ffc984435e0 RBP: 00007ffc98443590 R08: 0000000000000008 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000008 R13: 000000000041f57a R14: 0000000001eb71c0 R15: 0000000001ea5250