===================================== WARNING: bad unlock balance detected! 4.16.0-rc1+ #309 Not tainted ------------------------------------- sshd/4057 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: 3 locks held by sshd/4057: #0: (sk_lock-AF_INET){+.+.}, at: [<0000000080e0dfd6>] lock_sock include/net/sock.h:1463 [inline] #0: (sk_lock-AF_INET){+.+.}, at: [<0000000080e0dfd6>] tcp_sendmsg+0x21/0x50 net/ipv4/tcp.c:1462 #1: (rcu_read_lock){....}, at: [<00000000252bf94a>] read_pnet include/net/net_namespace.h:280 [inline] #1: (rcu_read_lock){....}, at: [<00000000252bf94a>] sock_net include/net/sock.h:2305 [inline] #1: (rcu_read_lock){....}, at: [<00000000252bf94a>] ip_queue_xmit+0x9e/0x18e0 net/ipv4/ip_output.c:429 #2: (rcu_read_lock){....}, at: [<000000003d16c146>] nf_hook include/linux/netfilter.h:206 [inline] #2: (rcu_read_lock){....}, at: [<000000003d16c146>] __ip_local_out+0x29b/0xa30 net/ipv4/ip_output.c:113 stack backtrace: CPU: 1 PID: 4057 Comm: sshd Not tainted 4.16.0-rc1+ #309 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_v2+0x496/0x710 net/netfilter/xt_hashlimit.c:837 ipt_do_table+0xa90/0x1950 net/ipv4/netfilter/ip_tables.c:296 iptable_filter_hook+0x65/0x80 net/ipv4/netfilter/iptable_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 include/linux/netfilter.h:243 [inline] __ip_local_out+0x4c1/0xa30 net/ipv4/ip_output.c:113 ip_local_out+0x2d/0x160 net/ipv4/ip_output.c:122 ip_queue_xmit+0x8c0/0x18e0 net/ipv4/ip_output.c:504 tcp_transmit_skb+0x1b12/0x38b0 net/ipv4/tcp_output.c:1176 tcp_write_xmit+0x68e/0x5290 net/ipv4/tcp_output.c:2368 __tcp_push_pending_frames+0xa0/0x250 net/ipv4/tcp_output.c:2541 tcp_push+0x547/0x780 net/ipv4/tcp.c:726 tcp_sendmsg_locked+0x289a/0x3c70 net/ipv4/tcp.c:1426 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1463 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 sock_write_iter+0x31a/0x5d0 net/socket.c:909 call_write_iter include/linux/fs.h:1781 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x684/0x970 fs/read_write.c:482 vfs_write+0x189/0x510 fs/read_write.c:544 SYSC_write fs/read_write.c:589 [inline] SyS_write+0xef/0x220 fs/read_write.c:581 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b RIP: 0033:0x7f31542a0370 RSP: 002b:00007ffca95833a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000078 RCX: 00007f31542a0370 RDX: 0000000000000078 RSI: 000055600b395460 RDI: 0000000000000003 RBP: 000055600b395460 R08: 0000000000000001 R09: 0101010101010101 R10: 0000000000000008 R11: 0000000000000246 R12: 00007ffca958340c R13: 000055600a83efb4 R14: 0000000000000028 R15: 000055600a840ca0