================================ WARNING: inconsistent lock state 4.15.0-rc9+ #283 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor5/28658 [HC0[0]:SC1[1]:HE1:SE0] takes: (&(&est->lock)->rlock){+.?.}, at: [<00000000b11c5987>] spin_lock include/linux/spinlock.h:310 [inline] (&(&est->lock)->rlock){+.?.}, at: [<00000000b11c5987>] est_fetch_counters+0x4f/0x150 net/core/gen_estimator.c:70 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3914 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:310 [inline] est_fetch_counters+0x4f/0x150 net/core/gen_estimator.c:70 gen_new_estimator+0x317/0x770 net/core/gen_estimator.c:162 xt_rateest_tg_checkentry+0x487/0xaa0 net/netfilter/xt_RATEEST.c:135 xt_check_target+0x22c/0x7d0 net/netfilter/x_tables.c:845 check_target net/ipv4/netfilter/ip_tables.c:518 [inline] find_check_entry.isra.8+0x8c8/0xcb0 net/ipv4/netfilter/ip_tables.c:559 translate_table+0xed1/0x1610 net/ipv4/netfilter/ip_tables.c:730 do_replace net/ipv4/netfilter/ip_tables.c:1148 [inline] do_ipt_set_ctl+0x370/0x5f0 net/ipv4/netfilter/ip_tables.c:1682 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ip_setsockopt+0xa1/0xb0 net/ipv4/ip_sockglue.c:1256 sctp_setsockopt+0x2a0/0x5de0 net/sctp/socket.c:4074 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2968 SYSC_setsockopt net/socket.c:1831 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1810 entry_SYSCALL_64_fastpath+0x29/0xa0 irq event stamp: 194 hardirqs last enabled at (194): [<00000000167dfddf>] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (194): [<00000000167dfddf>] _raw_spin_unlock_irq+0x27/0x70 kernel/locking/spinlock.c:192 hardirqs last disabled at (193): [<0000000094f044ee>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (193): [<0000000094f044ee>] _raw_spin_lock_irq+0x3c/0x80 kernel/locking/spinlock.c:160 softirqs last enabled at (0): [<00000000e46d7fc4>] copy_process.part.38+0x14ec/0x4b20 kernel/fork.c:1695 softirqs last disabled at (191): [<000000007b4a4fa9>] invoke_softirq kernel/softirq.c:365 [inline] softirqs last disabled at (191): [<000000007b4a4fa9>] irq_exit+0x1cc/0x200 kernel/softirq.c:405 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&est->lock)->rlock); lock(&(&est->lock)->rlock); *** DEADLOCK *** 1 lock held by syz-executor5/28658: #0: ((&est->timer)){+.-.}, at: [<0000000048920f5b>] lockdep_copy_map include/linux/lockdep.h:178 [inline] #0: ((&est->timer)){+.-.}, at: [<0000000048920f5b>] call_timer_fn+0x1c6/0x820 kernel/time/timer.c:1308 stack backtrace: CPU: 0 PID: 28658 Comm: syz-executor5 Not tainted 4.15.0-rc9+ #283 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_usage_bug+0x377/0x38c kernel/locking/lockdep.c:2537 valid_state kernel/locking/lockdep.c:2550 [inline] mark_lock_irq kernel/locking/lockdep.c:2744 [inline] mark_lock+0xf61/0x1430 kernel/locking/lockdep.c:3142 mark_irqflags kernel/locking/lockdep.c:3020 [inline] __lock_acquire+0x173a/0x3e00 kernel/locking/lockdep.c:3383 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3914 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:310 [inline] est_fetch_counters+0x4f/0x150 net/core/gen_estimator.c:70 est_timer+0x97/0x7c0 net/core/gen_estimator.c:85 call_timer_fn+0x228/0x820 kernel/time/timer.c:1318 expire_timers kernel/time/timer.c:1355 [inline] __run_timers+0x7ee/0xb70 kernel/time/timer.c:1658 run_timer_softirq+0x4c/0x70 kernel/time/timer.c:1684 __do_softirq+0x2d7/0xb85 kernel/softirq.c:285 invoke_softirq kernel/softirq.c:365 [inline] irq_exit+0x1cc/0x200 kernel/softirq.c:405 exiting_irq arch/x86/include/asm/apic.h:541 [inline] smp_apic_timer_interrupt+0x16b/0x700 arch/x86/kernel/apic/apic.c:1052 apic_timer_interrupt+0xa9/0xb0 arch/x86/entry/entry_64.S:937 RIP: 0010:spin_unlock include/linux/spinlock.h:350 [inline] RIP: 0010:futex_wake+0x566/0x680 kernel/futex.c:1573 RSP: 0018:ffff8801bcbf78c0 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff11 RAX: dffffc0000000000 RBX: ffffc90000c6f0a8 RCX: 1ffff1003a3e7db5 RDX: 1ffffffff0d591a9 RSI: 0000000000000001 RDI: ffffc90000c6f088 RBP: ffff8801bcbf7a10 R08: ffffc90000c6f0a0 R09: 1ffff1003797eef6 R10: ffff8801bcbf7778 R11: 0000000000000000 R12: ffffc90000c6f0a8 R13: dffffc0000000000 R14: ffff8801bcbf79e8 R15: ffffc90000c6f0c0 do_futex+0x11b0/0x22a0 kernel/futex.c:3549 SYSC_futex kernel/futex.c:3605 [inline] SyS_futex+0x260/0x390 kernel/futex.c:3573 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f5c4f313c88 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 00007f5c4f314700 RCX: 0000000000453299 RDX: 0000000020398000 RSI: 0000000000000001 RDI: 000000000071becc RBP: 0000000000000000 R08: 0000000000000000 R09: 00000000000003d6 R10: ffffffffffffffff R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000a2f33f R14: 00007f5c4f3149c0 R15: 0000000000000000 rdma_op 00000000858c8d07 conn xmit_rdma (null) rdma_op 000000003dff8894 conn xmit_rdma (null) rdma_op 00000000bc23a575 conn xmit_rdma (null) rdma_op 0000000077902d92 conn xmit_rdma (null) netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. kauditd_printk_skb: 69 callbacks suppressed audit: type=1400 audit(1517133454.155:1681): avc: denied { getattr } for pid=29097 comm="syz-executor4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'.