================================ WARNING: inconsistent lock state syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. ksoftirqd/0/16 [HC0[0]:SC1[1]:HE1:SE0] takes: ffff88802dcbb720 (&r->consumer_lock#4){+.?.}-{3:3}, at: spin_lock include/linux/spinlock.h:347 [inline] ffff88802dcbb720 (&r->consumer_lock#4){+.?.}-{3:3}, at: ptr_ring_consume include/linux/ptr_ring.h:363 [inline] ffff88802dcbb720 (&r->consumer_lock#4){+.?.}-{3:3}, at: ptr_ring_cleanup include/linux/ptr_ring.h:700 [inline] ffff88802dcbb720 (&r->consumer_lock#4){+.?.}-{3:3}, at: tap_sock_destruct+0x13b/0x330 drivers/net/tap.c:444 {SOFTIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 __raw_spin_lock include/linux/spinlock_api_smp.h:190 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:173 spin_lock include/linux/spinlock.h:347 [inline] ptr_ring_consume include/linux/ptr_ring.h:363 [inline] ptr_ring_cleanup include/linux/ptr_ring.h:700 [inline] tap_sock_destruct+0x13b/0x330 drivers/net/tap.c:444 __sk_destruct+0x85/0xb70 net/core/sock.c:2386 sk_destruct+0xc8/0xf0 net/core/sock.c:2448 __sk_free+0xf4/0x3e0 net/core/sock.c:2459 sk_free+0x61/0x90 net/core/sock.c:2470 sock_put include/net/sock.h:2024 [inline] tap_put_queue drivers/net/tap.c:179 [inline] tap_release+0x2fc/0x450 drivers/net/tap.c:517 __fput+0x3fb/0xb50 fs/file_table.c:512 fput_close_sync+0x118/0x250 fs/file_table.c:618 filp_close_sync+0x75/0xa0 fs/open.c:1574 __range_close+0x4a6/0x8b0 fs/file.c:919 __do_sys_close_range fs/file.c:1003 [inline] __se_sys_close_range fs/file.c:954 [inline] __x64_sys_close_range+0x1f8/0x430 fs/file.c:954 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 385018 hardirqs last enabled at (385018): [] kasan_quarantine_put+0x104/0x240 mm/kasan/quarantine.c:234 hardirqs last disabled at (385017): [] kasan_quarantine_put+0xc6/0x240 mm/kasan/quarantine.c:207 softirqs last enabled at (384612): [] run_ksoftirqd kernel/softirq.c:1133 [inline] softirqs last enabled at (384612): [] run_ksoftirqd+0x38/0x60 kernel/softirq.c:1125 softirqs last disabled at (384617): [] run_ksoftirqd kernel/softirq.c:1133 [inline] softirqs last disabled at (384617): [] run_ksoftirqd+0x38/0x60 kernel/softirq.c:1125 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&r->consumer_lock#4); lock(&r->consumer_lock#4); *** DEADLOCK *** locks held by ksoftirqd/0/16: 1, on CPU#0: #0: ffffffff8ffed5e0 (rcu_read_lock){....}-{1:3}, at: local_lock_release include/linux/local_lock_internal.h:62 [inline] #0: ffffffff8ffed5e0 (rcu_read_lock){....}-{1:3}, at: process_backlog+0x437/0x1600 net/core/dev.c:6913 stack backtrace: CPU: 0 UID: 0 PID: 16 Comm: ksoftirqd/0 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_usage_bug.part.0+0x258/0x340 kernel/locking/lockdep.c:4086 print_usage_bug kernel/locking/lockdep.c:4054 [inline] valid_state kernel/locking/lockdep.c:4100 [inline] mark_lock_irq kernel/locking/lockdep.c:4311 [inline] mark_lock+0x956/0x1020 kernel/locking/lockdep.c:4797 mark_usage kernel/locking/lockdep.c:4686 [inline] __lock_acquire+0x7f1/0x1f40 kernel/locking/lockdep.c:5242 lock_acquire kernel/locking/lockdep.c:5942 [inline] lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899 __raw_spin_lock include/linux/spinlock_api_smp.h:190 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:173 spin_lock include/linux/spinlock.h:347 [inline] ptr_ring_consume include/linux/ptr_ring.h:363 [inline] ptr_ring_cleanup include/linux/ptr_ring.h:700 [inline] tap_sock_destruct+0x13b/0x330 drivers/net/tap.c:444 __sk_destruct+0x85/0xb70 net/core/sock.c:2386 sk_destruct+0xc8/0xf0 net/core/sock.c:2448 __sk_free+0xf4/0x3e0 net/core/sock.c:2459 sock_wfree+0x254/0x7f0 net/core/sock.c:2754 skb_release_head_state+0x35f/0x400 net/core/skbuff.c:1167 skb_release_all net/core/skbuff.c:1187 [inline] __kfree_skb net/core/skbuff.c:1203 [inline] sk_skb_reason_drop+0xc4/0x1b0 net/core/skbuff.c:1242 kfree_skb_reason include/linux/skbuff.h:1330 [inline] kfree_skb include/linux/skbuff.h:1339 [inline] llc_rcv+0x4d5/0xa70 net/llc/llc_input.c:112 __netif_receive_skb_one_core+0x1b2/0x1e0 net/core/dev.c:6451 __netif_receive_skb+0x1f/0x120 net/core/dev.c:6564 process_backlog+0x487/0x1600 net/core/dev.c:6915 __napi_poll.constprop.0+0xaf/0x450 net/core/dev.c:8001 napi_poll net/core/dev.c:8064 [inline] net_rx_action+0xa40/0xf20 net/core/dev.c:8221 handle_softirqs+0x216/0xa20 kernel/softirq.c:669 run_ksoftirqd kernel/softirq.c:1133 [inline] run_ksoftirqd+0x38/0x60 kernel/softirq.c:1125 smpboot_thread_fn+0x41f/0xb90 kernel/smpboot.c:162 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245