===================================== WARNING: bad unlock balance detected! 4.16.0-rc2+ #323 Not tainted ------------------------------------- syzkaller366249/5178 is trying to release lock (rcu_read_lock_bh) at: [] rcu_read_unlock_bh include/linux/rcupdate.h:722 [inline] [] hashlimit_mt_common.isra.10+0x1beb/0x2610 net/netfilter/xt_hashlimit.c:777 but there are no more locks to release! other info that might help us debug this: 5 locks held by syzkaller366249/5178: #0: (&xt[i].mutex){+.+.}, at: [<0000000095434078>] xt_find_table_lock+0x3e/0x3e0 net/netfilter/x_tables.c:1046 #1: (&mm->mmap_sem){++++}, at: [<000000002ca06a2c>] __do_page_fault+0x32d/0xc90 arch/x86/mm/fault.c:1355 #2: ((&ndev->rs_timer)){+.-.}, at: [<000000003f7edf2a>] lockdep_copy_map include/linux/lockdep.h:178 [inline] #2: ((&ndev->rs_timer)){+.-.}, at: [<000000003f7edf2a>] call_timer_fn+0x1c6/0x820 kernel/time/timer.c:1316 #3: (rcu_read_lock){....}, at: [<0000000028bacaf4>] ip6_nd_hdr net/ipv6/ndisc.c:449 [inline] #3: (rcu_read_lock){....}, at: [<0000000028bacaf4>] ndisc_send_skb+0x826/0x1370 net/ipv6/ndisc.c:485 #4: (rcu_read_lock){....}, at: [<000000003deef885>] nf_hook.constprop.27+0x0/0x830 net/ipv6/ndisc.c:387 stack backtrace: CPU: 1 PID: 5178 Comm: syzkaller366249 Not tainted 4.16.0-rc2+ #323 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_unlock_imbalance_bug+0x12f/0x140 kernel/locking/lockdep.c:3484 __lock_release kernel/locking/lockdep.c:3691 [inline] lock_release+0x6fe/0xa40 kernel/locking/lockdep.c:3939 rcu_lock_release include/linux/rcupdate.h:249 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:724 [inline] hashlimit_mt_common.isra.10+0x1c08/0x2610 net/netfilter/xt_hashlimit.c:777 hashlimit_mt+0x78/0x90 net/netfilter/xt_hashlimit.c:846 ip6t_do_table+0x98d/0x1a30 net/ipv6/netfilter/ip6_tables.c:319 ip6table_filter_hook+0x65/0x80 net/ipv6/netfilter/ip6table_filter.c:41 nf_hook_entry_hookfn include/linux/netfilter.h:120 [inline] nf_hook_slow+0xba/0x1a0 net/netfilter/core.c:483 nf_hook.constprop.27+0x3f6/0x830 include/linux/netfilter.h:243 NF_HOOK include/linux/netfilter.h:286 [inline] ndisc_send_skb+0xa51/0x1370 net/ipv6/ndisc.c:491 ndisc_send_rs+0x126/0x670 net/ipv6/ndisc.c:685 addrconf_rs_timer+0x363/0x6b0 net/ipv6/addrconf.c:3769 call_timer_fn+0x228/0x820 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers+0x7ee/0xb70 kernel/time/timer.c:1666 run_timer_softirq+0x4c/0x70 kernel/time/timer.c:1692 __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+0x8e/0xa0 arch/x86/entry/entry_64.S:796 RIP: 0010:clear_page_erms+0x7/0x10 arch/x86/lib/clear_page_64.S:49 RSP: 0018:ffff8801d47a7058 EFLAGS: 00010246 ORIG_RAX: ffffffffffffff12 RAX: 0000000000000000 RBX: 0000000000000033 RCX: 0000000000000040 RDX: ffff8801b952c680 RSI: 0000160000000000 RDI: ffff8801b8a33fc0 RBP: ffff8801d47a70a8 R08: 000000000002fc50 R09: 0000000000000000 R10: ffffffffffffffe8 R11: 0000000000000000 R12: ffffea0006e28000 R13: 00000000000000a0 R14: dffffc0000000000 R15: ffffffff85f0dca0 __do_huge_pmd_anonymous_page mm/huge_memory.c:570 [inline] do_huge_pmd_anonymous_page+0x599/0x1b00 mm/huge_memory.c:728 create_huge_pmd mm/memory.c:3870 [inline] __handle_mm_fault+0x1a0c/0x3ce0 mm/memory.c:4074 handle_mm_fault+0x35c/0x970 mm/memory.c:4140 __do_page_fault+0x5c9/0xc90 arch/x86/mm/fault.c:1426 do_page_fault+0xee/0x730 arch/x86/mm/fault.c:1501 page_fault+0x62/0x90 arch/x86/entry/entry_64.S:1122 RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:180 RSP: 0018:ffff8801d47a79b8 EFLAGS: 00010246 RAX: fffff52000964e08 RBX: 0000000000000040 RCX: 0000000000000040 RDX: 0000000000000040 RSI: ffffc90004b27000 RDI: 0000000020c6a000 RBP: ffff8801d47a79e8 R08: fffff52000964e08 R09: fffff52000964e08 R10: 0000000000000008 R11: fffff52000964e07 R12: 0000000020c6a000 R13: ffffc90004b27000 R14: 00007ffffffff000 R15: 0000000020c6a040 copy_to_user include/linux/uaccess.h:155 [inline] __do_replace+0x840/0xa70 net/ipv6/netfilter/ip6_tables.c:1111 do_replace net/ipv6/netfilter/ip6_tables.c:1164 [inline] do_ip6t_set_ctl+0x40f/0x5f0 net/ipv6/netfilter/ip6_tables.c:1686 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ipv6_setsockopt+0x10b/0x130 net/ipv6/ipv6_sockglue.c:927 udpv6_setsockopt+0x45/0x80 net/ipv6/udp.c:1422 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2975 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x44a369 RSP: 002b:00007fff9a1c0a48 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00000000000003ec RCX: 000000000044a369 RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000003 RBP: 00007fff9a1c0b80 R08: 0000000000000570 R09: 00007fff9a1c0a90 R10: 0000000020000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff9a1c0a90 R14: 0000000000000000 R15: 00007fff9a1c0ba8