Subject: WARNING: at net/netfilter/core.c:218 __nf_hook_entries_try_shrink+0xf7/0x110

From: Mike Galbraith <[email-masked]>
Date: Thu, 07 Sep 2017 07:11:49 +0200

[   21.219604] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   21.433091] nf_conntrack version 0.5.0 (65536 buckets, 262144 max)
[   21.495849] ip_tables: (C) 2000-2006 Netfilter Core Team
[   22.404040] ------------[ cut here ]------------
[   22.404267] WARNING: CPU: 2 PID: 1379 at net/netfilter/core.c:218 __nf_hook_entries_try_shrink+0xf7/0x110
[   22.404484] Modules linked in: xt_tcpudp(E) iptable_filter(E) ip6table_mangle(E) nf_conntrack_netbios_ns(E) nf_conntrack_broadcast(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) ip_tables(E) xt_conntrack(E) nf_conntrack(E) ip6table_filter(E) ip6_tables(E) x_tables(E) nls_iso8859_1(E) nls_cp437(E) intel_rapl(E) x86_pkg_temp_thermal(E) intel_powerclamp(E) coretemp(E) snd_hda_codec_hdmi(E) kvm_intel(E) kvm(E) snd_hda_codec_realtek(E) snd_hda_codec_generic(E) snd_hda_intel(E) irqbypass(E) joydev(E) snd_hda_codec(E) snd_hwdep(E) snd_hda_core(E) snd_pcm(E) crct10dif_pclmul(E) snd_timer(E) crc32_pclmul(E) crc32c_intel(E) ghash_clmulni_intel(E) snd(E) pcbc(E) aesni_intel(E) iTCO_wdt(E) aes_x86_64(E) r8169(E) iTCO_vendor_support(E) crypto_simd(E) glue_helper(E) lpc_ich(E) mii(E) mei_me(E) mei(E) mfd_
 core(E) soundcore(E)
[   22.405405]  cryptd(E) i2c_i801(E) shpchp(E) intel_smartconnect(E) thermal(E) fan(E) battery(E) tpm_infineon(E) pcspkr(E) nfsd(E) auth_rpcgss(E) nfs_acl(E) lockd(E) grace(E) sunrpc(E) sr_mod(E) cdrom(E) hid_logitech_hidpp(E) hid_logitech_dj(E) uas(E) usb_storage(E) hid_generic(E) usbhid(E) nouveau(E) wmi(E) i2c_algo_bit(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) ehci_pci(E) fb_sys_fops(E) ahci(E) xhci_pci(E) ttm(E) libahci(E) ehci_hcd(E) xhci_hcd(E) libata(E) drm(E) usbcore(E) video(E) button(E) sd_mod(E) vfat(E) fat(E) virtio_rng(E) virtio_blk(E) virtio_mmio(E) virtio_pci(E) virtio_ring(E) virtio(E) ext4(E) crc16(E) mbcache(E) jbd2(E) fscrypto(E) loop(E) sg(E) dm_multipath(E) dm_mod(E) scsi_dh_rdac(E) scsi_dh_emc(E) scsi_dh_alua(E) scsi_mod(E) efivarfs(E) autofs4(E
 )
[   22.406419] CPU: 2 PID: 1379 Comm: iptables-batch Tainted: G            E   4.13.0.g1c9fe44-master #10
[   22.406662] Hardware name: MEDION MS-7848/MS-7848, BIOS M7848W08.20C 09/23/2013
[   22.406911] task: ffff88041e822940 task.stack: ffffc900003f4000
[   22.407161] RIP: 0010:__nf_hook_entries_try_shrink+0xf7/0x110
[   22.407411] RSP: 0018:ffffc900003f7c18 EFLAGS: 00010246
[   22.407668] RAX: 0000000000000010 RBX: ffff8803cce14e40 RCX: 0000000000000000
[   22.407918] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000000000001
[   22.408162] RBP: ffffc900003f7c38 R08: 0000000000000001 R09: 0000000000000000
[   22.408410] R10: 0000000000000000 R11: 0000000000040001 R12: ffff8803cce14e58
[   22.408663] R13: ffffffff81aac2c8 R14: ffffffffa09290a0 R15: ffffffff81aab9c0
[   22.408928] FS:  00007f6c31c1a700(0000) GS:ffff88041ec80000(0000) knlGS:0000000000000000
[   22.409186] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   22.409447] CR2: 00007f708537af14 CR3: 00000003fa4e5004 CR4: 00000000001606e0
[   22.409710] Call Trace:
[   22.409978]  nf_unregister_net_hooks+0xf2/0x1a0
[   22.410246]  ? mutex_lock+0xe/0x30
[   22.410518]  ? mutex_lock+0xe/0x30
[   22.410786]  ? cleanup_match+0x40/0x50 [ip_tables]
[   22.411052]  ipv4_hooks_unregister+0x58/0x70 [nf_conntrack_ipv4]
[   22.411322]  nf_ct_netns_put+0x3c/0x80 [nf_conntrack]
[   22.411584]  cleanup_match+0x32/0x50 [ip_tables]
[   22.411845]  cleanup_entry+0x2e/0x90 [ip_tables]
[   22.412110]  translate_table+0x454/0x570 [ip_tables]
[   22.412371]  do_ipt_set_ctl+0xed/0x193 [ip_tables]
[   22.412641]  nf_setsockopt+0x3e/0x60
[   22.412909]  ip_setsockopt+0x6f/0x90
[   22.413178]  SyS_setsockopt+0x5e/0xb0
[   22.413450]  entry_SYSCALL_64_fastpath+0x1a/0xa5
[   22.413706] RIP: 0033:0x7f6c3137cbca
[   22.413969] RSP: 002b:00007ffc32d9d558 EFLAGS: 00000202 ORIG_RAX: 0000000000000036
[   22.414224] RAX: ffffffffffffffda RBX: 00007f6c3162f678 RCX: 00007f6c3137cbca
[   22.414490] RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000007
[   22.414758] RBP: 00007f6c3162f620 R08: 0000000000000ac8 R09: fefefefeff626d74
[   22.415016] R10: 0000000001ed8920 R11: 0000000000000202 R12: 0000000000000af0
[   22.415293] R13: 0000000000000ac8 R14: 0000000000002709 R15: 0000000000000ad1
[   22.415564] Code: 39 d1 77 ba 4c 89 f7 e8 98 fe ff ff 4d 89 75 00 48 89 d8 5b 41 5c 41 5d 41 5e 5d c3 45 31 f6 eb eb 31 c0 eb ee 0f ff 31 c0 eb e8 <0f> ff 31 c0 0f 1f 44 00 00 eb dd 0f 1f 40 00 66 2e 0f 1f 84 00 
[   22.415881] ---[ end trace d15c01c3a7360856 ]---

Met 10 of those during this boot.  The first time I booted, the
warnings were followed by the explosion below, but that kernel was not
entirely virgin, so add a pinch of salt.

[   48.592298] Ebtables v2.0 registered
[   48.730755] BUG: unable to handle kernel NULL pointer dereference at 000000000000003c
[   48.732723] IP: _raw_read_lock_bh+0x15/0x30
[   48.734526] PGD 0 P4D 0 
[   48.736482] Oops: 0002 [#1] SMP
[   48.738317] Dumping ftrace buffer:
[   48.740260]    (ftrace buffer empty)
[   48.742226] Modules linked in: ebtable_filter(E+) ebtables(E) af_packet(E) bridge(E) stp(E) llc(E) iscsi_ibft(E) iscsi_boot_sysfs(E) nf_conntrack_ipv6(E) nf_defrag_ipv6(E) ipt_REJECT(E) xt_tcpudp(E) iptable_filter(E) ip6table_mangle(E) nf_conntrack_netbios_ns(E) nf_conntrack_broadcast(E) nf_conntrack_ipv4(E) nf_defrag_ipv4(E) ip_tables(E) xt_conntrack(E) nf_conntrack(E) ip6table_filter(E) ip6_tables(E) x_tables(E) nls_iso8859_1(E) nls_cp437(E) intel_rapl(E) x86_pkg_temp_thermal(E) intel_powerclamp(E) coretemp(E) kvm_intel(E) kvm(E) snd_hda_codec_hdmi(E) irqbypass(E) snd_hda_codec_realtek(E) snd_hda_codec_generic(E) snd_hda_intel(E) snd_hda_codec(E) snd_hwdep(E) crct10dif_pclmul(E) snd_hda_core(E) crc32_pclmul(E) snd_pcm(E) joydev(E) snd_timer(E) r8169(E) crc32c_intel(E) ghash_clmulni_in
 tel(E) snd(E)
[   48.751616]  mii(E) pcbc(E) aesni_intel(E) aes_x86_64(E) iTCO_wdt(E) shpchp(E) iTCO_vendor_support(E) crypto_simd(E) soundcore(E) glue_helper(E) mei_me(E) lpc_ich(E) mfd_core(E) mei(E) i2c_i801(E) cryptd(E) pcspkr(E) intel_smartconnect(E) battery(E) tpm_infineon(E) thermal(E) fan(E) nfsd(E) auth_rpcgss(E) nfs_acl(E) lockd(E) grace(E) sunrpc(E) sr_mod(E) cdrom(E) hid_logitech_hidpp(E) hid_logitech_dj(E) uas(E) usb_storage(E) hid_generic(E) usbhid(E) nouveau(E) wmi(E) i2c_algo_bit(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) fb_sys_fops(E) ttm(E) ahci(E) libahci(E) ehci_pci(E) xhci_pci(E) ehci_hcd(E) xhci_hcd(E) libata(E) drm(E) usbcore(E) video(E) button(E) sd_mod(E) vfat(E) fat(E) virtio_rng(E) virtio_blk(E) virtio_mmio(E) virtio_pci(E) virtio_ring(E) virtio(E) ext4(E
 ) crc16(E)
[   48.763168]  mbcache(E) jbd2(E) fscrypto(E) loop(E) sg(E) dm_multipath(E) dm_mod(E) scsi_dh_rdac(E) scsi_dh_emc(E) scsi_dh_alua(E) scsi_mod(E) efivarfs(E) autofs4(E)
[   48.766157] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G        W   E   4.13.0.g1c9fe44-master #9
[   48.769108] Hardware name: MEDION MS-7848/MS-7848, BIOS M7848W08.20C 09/23/2013
[   48.772251] task: ffff88018fe42940 task.stack: ffffc90000088000
[   48.775370] RIP: 0010:_raw_read_lock_bh+0x15/0x30
[   48.776496] RSP: 0018:ffff88041ec83bd0 EFLAGS: 00010286
[   48.777414] RAX: 0000000000000100 RBX: 0000000000000001 RCX: 0000000000000000
[   48.778302] RDX: 0000000000000000 RSI: ffff88041ec83ca8 RDI: 000000000000003c
[   48.779189] RBP: 0000000000000000 R08: 0000000000000001 R09: 00000000088a0c8d
[   48.780072] R10: 0000000000000000 R11: 0000000000007b00 R12: ffff8803cdcc1300
[   48.780950] R13: ffff8803cdcc1300 R14: 0000000000000000 R15: ffff8803f1b8b000
[   48.781845] FS:  0000000000000000(0000) GS:ffff88041ec80000(0000) knlGS:0000000000000000
[   48.782727] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   48.783533] CR2: 000000000000003c CR3: 00000003f19fa001 CR4: 00000000001606e0
[   48.784348] Call Trace:
[   48.785160]  <IRQ>
[   48.786004]  ebt_do_table+0x3b/0x6ca [ebtables]
[   48.786900]  ? dequeue_rt_stack+0x4c/0x290
[   48.787792]  ? enqueue_task_rt+0x1da/0x300
[   48.789001]  nf_hook_slow+0x37/0xb0
[   48.790662]  br_pass_frame_up+0xbe/0xd0 [bridge]
[   48.792328]  ? __br_handle_local_finish+0x40/0x40 [bridge]
[   48.794011]  br_handle_frame_finish+0x21f/0x4b0 [bridge]
[   48.795688]  ? __udp4_lib_lookup+0x187/0x360
[   48.797368]  br_handle_frame+0x149/0x2b0 [bridge]
[   48.799054]  ? udp4_lib_lookup_skb+0x78/0x90
[   48.800737]  ? br_handle_local_finish+0x40/0x40 [bridge]
[   48.802424]  __netif_receive_skb_core+0x244/0xa40
[   48.804107]  ? inet_gro_receive+0x20c/0x2a0
[   48.805870]  netif_receive_skb_internal+0x8a/0xb0
[   48.807627]  napi_gro_receive+0xbc/0xe0
[   48.809381]  rtl8169_poll+0x189/0x660 [r8169]
[   48.811139]  net_rx_action+0x26e/0x3a0
[   48.812869]  __do_softirq+0xc8/0x26b
[   48.814704]  irq_exit+0xc7/0xd0
[   48.816633]  do_IRQ+0x4c/0xd0
[   48.818554]  common_interrupt+0x96/0x96
[   48.820471]  </IRQ>
[   48.822381] RIP: 0010:cpuidle_enter_state+0xe8/0x270
[   48.824296] RSP: 0018:ffffc9000008bec8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff6d
[   48.826243] RAX: ffff88041ec99800 RBX: ffff88041eca0800 RCX: 000000000000001f
[   48.828195] RDX: 0000000000000000 RSI: fffffffdbfeaa3d2 RDI: 0000000000000000
[   48.830156] RBP: 0000000000000001 R08: 0000000000000006 R09: 0000000000000001
[   48.832096] R10: 0000000000000002 R11: 0000000000000006 R12: 0000000000000002
[   48.834018] R13: 0000000000000000 R14: 0000000b585e3b60 R15: 0000000b5893f5ee
[   48.835946]  ? cpuidle_enter_state+0xc3/0x270
[   48.837869]  do_idle+0x170/0x1d0
[   48.839779]  cpu_startup_entry+0x19/0x20
[   48.841697]  start_secondary+0x103/0x130
[   48.843611]  secondary_startup_64+0xa5/0xa5
[   48.845524] Code: f0 0f c1 07 8d b0 00 01 00 00 40 84 f6 75 02 f3 c3 e9 f0 14 b0 ff 0f 1f 44 00 00 65 81 05 e8 b8 a6 7e 00 02 00 00 b8 00 01 00 00 <f0> 0f c1 07 8d b0 00 01 00 00 40 84 f6 75 02 f3 c3 e9 c5 14 b0 
[   48.847593] RIP: _raw_read_lock_bh+0x15/0x30 RSP: ffff88041ec83bd0
[   48.849636] CR2: 000000000000003c