================================ WARNING: inconsistent lock state 4.15.0-rc9+ #283 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syzkaller120564/3698 [HC0[0]:SC1[1]:HE1:SE0] takes: (&(&est->lock)->rlock){+.?.}, at: [<000000008ed6e5b8>] spin_lock include/linux/spinlock.h:310 [inline] (&(&est->lock)->rlock){+.?.}, at: [<000000008ed6e5b8>] 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: 155600 hardirqs last enabled at (155600): [<0000000054175bea>] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (155600): [<0000000054175bea>] _raw_spin_unlock_irq+0x27/0x70 kernel/locking/spinlock.c:192 hardirqs last disabled at (155599): [<00000000797f58c5>] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (155599): [<00000000797f58c5>] _raw_spin_lock_irq+0x3c/0x80 kernel/locking/spinlock.c:160 softirqs last enabled at (155512): [<00000000f843fae5>] spin_unlock_bh include/linux/spinlock.h:355 [inline] softirqs last enabled at (155512): [<00000000f843fae5>] release_sock+0x1d4/0x2a0 net/core/sock.c:2790 softirqs last disabled at (155597): [<00000000326e9324>] invoke_softirq kernel/softirq.c:365 [inline] softirqs last disabled at (155597): [<00000000326e9324>] 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 syzkaller120564/3698: #0: ((&est->timer)){+.-.}, at: [<00000000cde3bfb4>] lockdep_copy_map include/linux/lockdep.h:178 [inline] #0: ((&est->timer)){+.-.}, at: [<00000000cde3bfb4>] call_timer_fn+0x1c6/0x820 kernel/time/timer.c:1308 stack backtrace: CPU: 1 PID: 3698 Comm: syzkaller120564 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:update_stack_state+0xb3/0x700 arch/x86/kernel/unwind_frame.c:215 RSP: 0018:ffff8801d97bf3b0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff11 RAX: dffffc0000000000 RBX: ffff8801d97bf5e8 RCX: ffff8801d97bf598 RDX: 1ffff1003b2f7ec7 RSI: ffff8801d97bf8e0 RDI: ffff8801d97bf638 RBP: ffff8801d97bf4b8 R08: ffff8801d97bf620 R09: ffff8801d9096200 R10: 000000000000000b R11: ffffed003b2f7ec7 R12: 1ffff1003b2f7e7e R13: ffff8801d97bf8e0 R14: 1ffff1003b2f7ea3 R15: ffff8801d97bf5e8 unwind_next_frame.part.6+0x1a6/0xb40 arch/x86/kernel/unwind_frame.c:329 unwind_next_frame+0x3e/0x50 arch/x86/kernel/unwind_frame.c:287 __save_stack_trace+0x6e/0xd0 arch/x86/kernel/stacktrace.c:44 save_stack_trace+0x1a/0x20 arch/x86/kernel/stacktrace.c:60 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:551 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 slab_post_alloc_hook mm/slab.h:442 [inline] slab_alloc mm/slab.c:3382 [inline] kmem_cache_alloc+0x11b/0x760 mm/slab.c:3542 sk_prot_alloc+0x65/0x2a0 net/core/sock.c:1463 sk_alloc+0x105/0x1410 net/core/sock.c:1523 inet6_create+0x44d/0x10f0 net/ipv6/af_inet6.c:183 __sock_create+0x4d4/0x850 net/socket.c:1267 sock_create net/socket.c:1307 [inline] SYSC_socket net/socket.c:1337 [inline] SyS_socket+0xeb/0x1d0 net/socket.c:1317 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x4419c9 RSP: 002b:00007ffdbe62b6f8 EFLAGS: 00000217 ORIG_RAX: 0000000000000029 RAX: ffffffffffffffda RBX: ffffffffffffffff RCX: 00000000004419c9 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 000000000000000a RBP: f6fcce9cd855ec40 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000217 R12: fbfe5b6031634428 R13: 5826b2d59f7fe9a1 R14: fd7217c033abf8b5 R15: 0000000000000000 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21