================================ WARNING: inconsistent lock state 4.15.0-rc9+ #283 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor6/32639 [HC0[0]:SC1[1]:HE1:SE0] takes: (&(&est->lock)->rlock){+.?.}, at: [<000000004ee36c9d>] spin_lock include/linux/spinlock.h:310 [inline] (&(&est->lock)->rlock){+.?.}, at: [<000000004ee36c9d>] 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/ipv6/netfilter/ip6_tables.c:538 [inline] find_check_entry.isra.7+0x935/0xcf0 net/ipv6/netfilter/ip6_tables.c:580 translate_table+0xf52/0x1690 net/ipv6/netfilter/ip6_tables.c:749 do_replace net/ipv6/netfilter/ip6_tables.c:1167 [inline] do_ip6t_set_ctl+0x370/0x5f0 net/ipv6/netfilter/ip6_tables.c:1693 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ipv6_setsockopt+0x115/0x150 net/ipv6/ipv6_sockglue.c:928 udpv6_setsockopt+0x45/0x80 net/ipv6/udp.c:1452 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: 3646 hardirqs last enabled at (3646): [<0000000048d3bd2c>] restore_regs_and_return_to_kernel+0x0/0x21 hardirqs last disabled at (3645): [<0000000013d7dddf>] apic_timer_interrupt+0xa4/0xb0 arch/x86/entry/entry_64.S:937 softirqs last enabled at (3630): [<00000000096a39f6>] __do_softirq+0x7a0/0xb85 kernel/softirq.c:311 softirqs last disabled at (3641): [<0000000059218d4c>] invoke_softirq kernel/softirq.c:365 [inline] softirqs last disabled at (3641): [<0000000059218d4c>] 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 *** 2 locks held by syz-executor6/32639: #0: (&(ptlock_ptr(page))->rlock#2){+.+.}, at: [<000000003207e17a>] spin_lock include/linux/spinlock.h:310 [inline] #0: (&(ptlock_ptr(page))->rlock#2){+.+.}, at: [<000000003207e17a>] zap_pte_range mm/memory.c:1295 [inline] #0: (&(ptlock_ptr(page))->rlock#2){+.+.}, at: [<000000003207e17a>] zap_pmd_range mm/memory.c:1438 [inline] #0: (&(ptlock_ptr(page))->rlock#2){+.+.}, at: [<000000003207e17a>] zap_pud_range mm/memory.c:1467 [inline] #0: (&(ptlock_ptr(page))->rlock#2){+.+.}, at: [<000000003207e17a>] zap_p4d_range mm/memory.c:1488 [inline] #0: (&(ptlock_ptr(page))->rlock#2){+.+.}, at: [<000000003207e17a>] unmap_page_range+0xc5d/0x22e0 mm/memory.c:1509 #1: ((&est->timer)){+.-.}, at: [<00000000c1b4e750>] lockdep_copy_map include/linux/lockdep.h:178 [inline] #1: ((&est->timer)){+.-.}, at: [<00000000c1b4e750>] call_timer_fn+0x1c6/0x820 kernel/time/timer.c:1308 stack backtrace: CPU: 1 PID: 32639 Comm: syz-executor6 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:arch_local_irq_restore arch/x86/include/asm/paravirt.h:777 [inline] RIP: 0010:lock_release+0x503/0xa40 kernel/locking/lockdep.c:3936 RSP: 0018:ffff8801c20e6958 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff11 RAX: dffffc0000000000 RBX: ffff8801d84065c0 RCX: 1ffff1003b080dc5 RDX: 1ffffffff0d5918d RSI: 0000000000000002 RDI: 0000000000000282 RBP: ffff8801c20e6a88 R08: ffffffff86b41580 R09: 1ffff1003841cd34 R10: ffff8801c20e68d8 R11: 0000000000000001 R12: b7e390510b9c6540 R13: ffff8801d84065c0 R14: ffff8801c20e69a0 R15: 1ffff1003841cd30 rcu_lock_release include/linux/rcupdate.h:249 [inline] rcu_read_unlock include/linux/rcupdate.h:687 [inline] __unlock_page_memcg+0x72/0x100 mm/memcontrol.c:1697 unlock_page_memcg+0x2c/0x40 mm/memcontrol.c:1706 page_remove_file_rmap mm/rmap.c:1247 [inline] page_remove_rmap+0x3b7/0xcb0 mm/rmap.c:1298 zap_pte_range mm/memory.c:1334 [inline] zap_pmd_range mm/memory.c:1438 [inline] zap_pud_range mm/memory.c:1467 [inline] zap_p4d_range mm/memory.c:1488 [inline] unmap_page_range+0xfc3/0x22e0 mm/memory.c:1509 unmap_single_vma+0x15f/0x2d0 mm/memory.c:1554 unmap_vmas+0xf1/0x1b0 mm/memory.c:1584 exit_mmap+0x23a/0x500 mm/mmap.c:3020 __mmput kernel/fork.c:923 [inline] mmput+0x223/0x6d0 kernel/fork.c:944 exit_mm kernel/exit.c:544 [inline] do_exit+0x90a/0x1ad0 kernel/exit.c:852 do_group_exit+0x149/0x400 kernel/exit.c:968 get_signal+0x73f/0x16c0 kernel/signal.c:2335 do_signal+0x90/0x1eb0 arch/x86/kernel/signal.c:809 exit_to_usermode_loop+0x214/0x310 arch/x86/entry/common.c:158 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath+0x490/0x550 arch/x86/entry/common.c:264 entry_SYSCALL_64_fastpath+0x9e/0xa0 RIP: 0033:0x453299 RSP: 002b:00007faf4bd91ce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000071bec8 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000071bec8 RBP: 000000000071bec8 R08: 00000000000004ad R09: 000000000071bea0 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000a2f33f R14: 00007faf4bd929c0 R15: 0000000000000000 sctp: [Deprecated]: syz-executor0 (pid 712) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor0 (pid 712) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor0 (pid 734) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor0 (pid 745) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor0 (pid 785) Use of int in maxseg socket option. Use struct sctp_assoc_value instead device eql entered promiscuous mode device eql entered promiscuous mode device eql entered promiscuous mode device eql entered promiscuous mode snd_dummy snd_dummy.0: control 112:0:0:Î:0 is already present snd_dummy snd_dummy.0: control 112:0:0:Î:0 is already present snd_dummy snd_dummy.0: control 112:0:0:Î:0 is already present snd_dummy snd_dummy.0: control 112:0:0:Î:0 is already present snd_dummy snd_dummy.0: control 112:0:0:Î:0 is already present snd_dummy snd_dummy.0: control 112:0:0:Î:0 is already present snd_dummy snd_dummy.0: control 112:0:0:Î:0 is already present snd_dummy snd_dummy.0: control 112:0:0:Î:0 is already present snd_dummy snd_dummy.0: control 112:0:0:Î:0 is already present snd_dummy snd_dummy.0: control 112:0:0:Î:0 is already present snd_dummy snd_dummy.0: control 112:0:0:Î:0 is already present x_tables: ip_tables: icmp match: only valid for protocol 1 x_tables: ip_tables: icmp match: only valid for protocol 1 x_tables: ip_tables: icmp match: only valid for protocol 1 snd_dummy snd_dummy.0: control 112:0:0:Î:0 is already present x_tables: ip_tables: icmp match: only valid for protocol 1 x_tables: ip_tables: icmp match: only valid for protocol 1 kauditd_printk_skb: 106 callbacks suppressed audit: type=1400 audit(1517128399.708:1898): avc: denied { read } for pid=1755 comm="syz-executor7" path="socket:[85197]" dev="sockfs" ino=85197 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 sctp: [Deprecated]: syz-executor4 (pid 1951) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead