================================ WARNING: inconsistent lock state 5.10.0-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.3/10396 [HC0[0]:SC1[1]:HE1:SE0] takes: ffff88802c5f4ea8 (&file_data->lock){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffff88802c5f4ea8 (&file_data->lock){+.?.}-{2:2}, at: io_file_data_ref_zero+0x75/0x480 fs/io_uring.c:7361 {SOFTIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5437 [inline] lock_acquire+0x29d/0x740 kernel/locking/lockdep.c:5402 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] io_sqe_files_register fs/io_uring.c:7496 [inline] __io_uring_register fs/io_uring.c:9665 [inline] __do_sys_io_uring_register+0x343a/0x40d0 fs/io_uring.c:9755 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 irq event stamp: 3476 hardirqs last enabled at (3476): [] asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:628 hardirqs last disabled at (3475): [] sysvec_apic_timer_interrupt+0xc/0x100 arch/x86/kernel/apic/apic.c:1096 softirqs last enabled at (3074): [] lock_sock_nested+0x94/0x110 net/core/sock.c:3039 softirqs last disabled at (3419): [] asm_call_irq_on_stack+0xf/0x20 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&file_data->lock); lock(&file_data->lock); *** DEADLOCK *** 4 locks held by syz-executor.3/10396: #0: ffff88807687aee0 (sk_lock-AF_TIPC){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1579 [inline] #0: ffff88807687aee0 (sk_lock-AF_TIPC){+.+.}-{0:0}, at: tipc_sendstream+0x3e/0x70 net/tipc/socket.c:1530 #1: ffffffff8b45c058 (remove_cache_srcu){....}-{0:0}, at: quarantine_reduce+0x41/0x200 mm/kasan/quarantine.c:269 #2: ffffffff8b3390c0 (rcu_callback){....}-{0:0}, at: rcu_do_batch kernel/rcu/tree.c:2479 [inline] #2: ffffffff8b3390c0 (rcu_callback){....}-{0:0}, at: rcu_core+0x582/0xf00 kernel/rcu/tree.c:2723 #3: ffffffff8b3391e0 (rcu_read_lock){....}-{1:2}, at: percpu_ref_put_many.constprop.0+0x0/0x250 net/netfilter/xt_cgroup.c:62 stack backtrace: CPU: 0 PID: 10396 Comm: syz-executor.3 Not tainted 5.10.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:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 print_usage_bug kernel/locking/lockdep.c:3740 [inline] valid_state kernel/locking/lockdep.c:3751 [inline] mark_lock_irq kernel/locking/lockdep.c:3954 [inline] mark_lock.cold+0x31/0x73 kernel/locking/lockdep.c:4411 mark_usage kernel/locking/lockdep.c:4306 [inline] __lock_acquire+0x11a5/0x5500 kernel/locking/lockdep.c:4786 lock_acquire kernel/locking/lockdep.c:5437 [inline] lock_acquire+0x29d/0x740 kernel/locking/lockdep.c:5402 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] io_file_data_ref_zero+0x75/0x480 fs/io_uring.c:7361 percpu_ref_put_many.constprop.0+0x217/0x250 include/linux/percpu-refcount.h:322 rcu_do_batch kernel/rcu/tree.c:2489 [inline] rcu_core+0x5eb/0xf00 kernel/rcu/tree.c:2723 __do_softirq+0x2a0/0x9f6 kernel/softirq.c:298 asm_call_irq_on_stack+0xf/0x20 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline] do_softirq_own_stack+0xaa/0xd0 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:393 [inline] __irq_exit_rcu kernel/softirq.c:423 [inline] irq_exit_rcu+0x132/0x200 kernel/softirq.c:435 sysvec_apic_timer_interrupt+0x4d/0x100 arch/x86/kernel/apic/apic.c:1096 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:628 RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline] RIP: 0010:_raw_spin_unlock_irq+0x25/0x40 kernel/locking/spinlock.c:199 Code: 0f 1f 44 00 00 55 48 8b 74 24 08 48 89 fd 48 83 c7 18 e8 4e d7 6c f8 48 89 ef e8 d6 8b 6d f8 e8 c1 8d 8c f8 fb bf 01 00 00 00 26 a6 61 f8 65 8b 05 af 4e 18 77 85 c0 74 02 5d c3 e8 1b a4 16 RSP: 0018:ffffc90016ff73a0 EFLAGS: 00000206 RAX: 0000000000000d59 RBX: 0000000000000001 RCX: ffffffff8155fc77 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000001 RBP: ffff8880b9e34cc0 R08: 0000000000000001 R09: ffffffff8ebba85f R10: fffffbfff1d7750b R11: 0000000000000000 R12: ffff8880b9e34cc0 R13: ffff88807413e500 R14: 0000000000000000 R15: ffff8880b9e34cd8 finish_lock_switch kernel/sched/core.c:4079 [inline] finish_task_switch.isra.0+0x18c/0xbb0 kernel/sched/core.c:4196 context_switch kernel/sched/core.c:4330 [inline] __schedule+0x8d5/0x2150 kernel/sched/core.c:5078 preempt_schedule_irq+0x4e/0x90 kernel/sched/core.c:5340 irqentry_exit_cond_resched kernel/entry/common.c:393 [inline] irqentry_exit_cond_resched kernel/entry/common.c:385 [inline] irqentry_exit+0x7a/0xa0 kernel/entry/common.c:423 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:628 RIP: 0010:qlist_free_all+0x4b/0x100 mm/kasan/quarantine.c:165 Code: 00 00 00 fc ff df 49 89 ff eb 2b 48 89 f0 48 c7 c2 2c b7 b1 81 48 c1 e8 03 42 c6 04 30 fb e8 cc 84 ff ff 4d 85 ed 75 4b 53 9d <48> 85 ed 0f 84 81 00 00 00 48 89 ee 4d 85 e4 4c 89 e7 74 3c 48 63 RSP: 0018:ffffc90016ff75a8 EFLAGS: 00000282 RAX: 0000000000000d55 RBX: 0000000000000282 RCX: ffffffff8155fc77 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff8880286bdd00 R08: 0000000000000001 R09: ffffffff8ebba85f R10: fffffbfff1d7750b R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000200 R14: dffffc0000000000 R15: ffffc90016ff75f0 quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:267 __kasan_kmalloc.constprop.0+0x9e/0xd0 mm/kasan/common.c:442 slab_post_alloc_hook mm/slab.h:535 [inline] slab_alloc_node mm/slab.c:3256 [inline] kmem_cache_alloc_node+0x1c9/0x4e0 mm/slab.c:3576 __alloc_skb+0x71/0x550 net/core/skbuff.c:198 alloc_skb_fclone include/linux/skbuff.h:1144 [inline] tipc_buf_acquire+0x28/0xf0 net/tipc/msg.c:76 tipc_msg_build+0xf0/0x10c0 net/tipc/msg.c:397 __tipc_sendstream+0x6d0/0x1150 net/tipc/socket.c:1600 tipc_sendstream+0x4c/0x70 net/tipc/socket.c:1531 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:671 ____sys_sendmsg+0x331/0x810 net/socket.c:2353 ___sys_sendmsg+0xf3/0x170 net/socket.c:2407 __sys_sendmmsg+0x195/0x470 net/socket.c:2497 __do_sys_sendmmsg net/socket.c:2526 [inline] __se_sys_sendmmsg net/socket.c:2523 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2523 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45e159 Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f6873638c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000000000045e159 RDX: 0252da778b17d5c0 RSI: 0000000020003240 RDI: 0000000000000004 RBP: 000000000119bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119bf8c R13: 00007ffe1d9a3d7f R14: 00007f68736399c0 R15: 000000000119bf8c