================================ WARNING: inconsistent lock state 5.9.0-rc8-next-20201008-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.5/7029 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff888028c2f818 (&xa->xa_lock#8){+.?.}-{2:2}, at: xa_destroy+0xaa/0x350 lib/xarray.c:2205 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x1f2/0xaa0 kernel/locking/lockdep.c:5419 __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_uring_add_task_file fs/io_uring.c:8607 [inline] io_uring_add_task_file+0x207/0x430 fs/io_uring.c:8590 io_uring_get_fd fs/io_uring.c:9116 [inline] io_uring_create fs/io_uring.c:9280 [inline] io_uring_setup+0x2727/0x3660 fs/io_uring.c:9314 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 irq event stamp: 275163 hardirqs last enabled at (275162): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] hardirqs last enabled at (275162): [] _raw_spin_unlock_irqrestore+0x6f/0x90 kernel/locking/spinlock.c:191 hardirqs last disabled at (275163): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (275163): [] _raw_spin_lock_irqsave+0xa9/0xd0 kernel/locking/spinlock.c:159 softirqs last enabled at (275034): [] xt_replace_table+0x344/0x7e0 net/netfilter/x_tables.c:1387 softirqs last disabled at (275105): [] asm_call_irq_on_stack+0xf/0x20 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&xa->xa_lock#8); lock(&xa->xa_lock#8); *** DEADLOCK *** 2 locks held by syz-executor.5/7029: #0: ffff888137320d88 (&xt[i].mutex){+.+.}-{3:3}, at: xt_find_table_lock+0x41/0x540 net/netfilter/x_tables.c:1206 #1: ffffffff8a554c80 (rcu_callback){....}-{0:0}, at: rcu_do_batch kernel/rcu/tree.c:2474 [inline] #1: ffffffff8a554c80 (rcu_callback){....}-{0:0}, at: rcu_core+0x5d8/0x1240 kernel/rcu/tree.c:2718 stack backtrace: CPU: 1 PID: 7029 Comm: syz-executor.5 Not tainted 5.9.0-rc8-next-20201008-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+0x198/0x1fb lib/dump_stack.c:118 print_usage_bug kernel/locking/lockdep.c:3715 [inline] valid_state kernel/locking/lockdep.c:3726 [inline] mark_lock_irq kernel/locking/lockdep.c:3929 [inline] mark_lock.cold+0x32/0x74 kernel/locking/lockdep.c:4396 mark_usage kernel/locking/lockdep.c:4281 [inline] __lock_acquire+0x118a/0x56d0 kernel/locking/lockdep.c:4771 lock_acquire+0x1f2/0xaa0 kernel/locking/lockdep.c:5419 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x94/0xd0 kernel/locking/spinlock.c:159 xa_destroy+0xaa/0x350 lib/xarray.c:2205 __io_uring_free+0x60/0xc0 fs/io_uring.c:7693 io_uring_free include/linux/io_uring.h:40 [inline] __put_task_struct+0xff/0x3f0 kernel/fork.c:732 put_task_struct include/linux/sched/task.h:111 [inline] delayed_put_task_struct+0x1f6/0x340 kernel/exit.c:172 rcu_do_batch kernel/rcu/tree.c:2484 [inline] rcu_core+0x645/0x1240 kernel/rcu/tree.c:2718 __do_softirq+0x203/0xab6 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+0x9b/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+0x235/0x280 kernel/softirq.c:435 sysvec_apic_timer_interrupt+0x51/0xf0 arch/x86/kernel/apic/apic.c:1091 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:631 RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline] RIP: 0010:_raw_spin_unlock_irq+0x4b/0x80 kernel/locking/spinlock.c:199 Code: c0 f8 01 3d 8a 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 75 31 48 83 3d 56 12 f5 01 00 74 25 fb 66 0f 1f 44 00 00 01 00 00 00 e8 bb 31 08 f9 65 8b 05 c4 0e ba 77 85 c0 74 02 5d RSP: 0018:ffffc90005697980 EFLAGS: 00000282 RAX: 1ffffffff147a03f RBX: ffff888068d00140 RCX: ffffffff815aa1a7 RDX: dffffc0000000000 RSI: 0000000000000002 RDI: 0000000000000000 RBP: ffff8880ae536040 R08: 0000000000000001 R09: ffffffff8d732a17 R10: fffffbfff1ae6542 R11: 0000000000000000 R12: ffff8880ae536040 R13: ffff88801b60e180 R14: 0000000000000000 R15: 0000000000000001 finish_lock_switch kernel/sched/core.c:3513 [inline] finish_task_switch+0x150/0x7a0 kernel/sched/core.c:3613 context_switch kernel/sched/core.c:3776 [inline] __schedule+0xecd/0x2200 kernel/sched/core.c:4522 preempt_schedule_irq+0xbf/0x1b0 kernel/sched/core.c:4783 irqentry_exit_cond_resched kernel/entry/common.c:358 [inline] irqentry_exit_cond_resched kernel/entry/common.c:350 [inline] irqentry_exit+0x65/0x90 kernel/entry/common.c:388 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:631 RIP: 0010:_copy_to_user+0x2c/0x150 lib/usercopy.c:29 Code: 41 55 49 89 f5 41 54 55 48 89 fd 53 48 89 d3 e8 da 5d b8 fd be 1c 00 00 00 48 c7 c7 a0 18 f9 88 e8 79 85 e9 fd e8 04 ac 14 00 <31> ff 41 89 c4 89 c6 e8 d8 59 b8 fd 45 84 e4 0f 85 01 01 00 00 e8 RSP: 0018:ffffc90005697bb0 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 00000000000000a8 RCX: 0000000000000000 RDX: 1ffffffff159d098 RSI: 0000000000000001 RDI: ffff888068d0153c RBP: 00007ffd4dd60658 R08: 0000000000000001 R09: ffff888068d00a50 R10: fffffbfff176af49 R11: 0000000000000000 R12: ffff888016eb5380 R13: ffff888016eb5380 R14: 0000000000000428 R15: 0000000000000000 copy_to_user include/linux/uaccess.h:200 [inline] copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:852 [inline] get_entries net/ipv6/netfilter/ip6_tables.c:1040 [inline] do_ip6t_get_ctl+0x6b0/0xa10 net/ipv6/netfilter/ip6_tables.c:1669 nf_getsockopt+0x72/0xd0 net/netfilter/nf_sockopt.c:116 ipv6_getsockopt+0x1d5/0x2b0 net/ipv6/ipv6_sockglue.c:1486 tcp_getsockopt+0x86/0xd0 net/ipv4/tcp.c:3880 __sys_getsockopt+0x219/0x4e0 net/socket.c:2173 __do_sys_getsockopt net/socket.c:2188 [inline] __se_sys_getsockopt net/socket.c:2185 [inline] __x64_sys_getsockopt+0xba/0x150 net/socket.c:2185 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x46093a Code: b8 34 01 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 ed 88 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 37 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 ca 88 fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007ffd4dd60268 EFLAGS: 00000216 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00007ffd4dd60290 RCX: 000000000046093a RDX: 0000000000000041 RSI: 0000000000000029 RDI: 0000000000000003 RBP: 000000000074bca0 R08: 00007ffd4dd6028c R09: 0000000000004000 R10: 00007ffd4dd602f0 R11: 0000000000000216 R12: 00007ffd4dd602f0 R13: 0000000000000003 R14: 000000000074a1a0 R15: 0000000000000029 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters.