Re: WARNING: CPU: 0 PID: 0 at ./include/linux/netfilter.h:233 arp_rcv

2018-01-08 Thread Marco Franchi
2018-01-08 4:32 GMT-02:00 Andy Duan :
> From: Marco Franchi  Sent: Friday, January 05, 2018 11:03 
> PM
>>Hi,
>>
>>I am getting the following warning on a imx6ul-evk board running linux-next
>>20180105:
>>
>>[9.233290] [ cut here ]
>>[9.242068] WARNING: CPU: 0 PID: 0 at
>>./include/linux/netfilter.h:233 arp_rcv+0x1f8/0x228
>>[9.250381] Modules linked in:
>>[9.253633] CPU: 0 PID: 0 Comm: swapper/0 Not tainted
>>4.15.0-rc6-next-20180104-dirty #2
>>[9.261764] Hardware name: Freescale i.MX6 Ultralite (Device Tree)
>>[9.268065] Backtrace:
>>[9.270719] [] (dump_backtrace) from []
>>(show_stack+0x18/0x1c)
>>[9.278438]  r7: r6:6153 r5: r4:c1079878
>>[9.284258] [] (show_stack) from []
>>(dump_stack+0xb4/0xe8)
>>[9.291641] [] (dump_stack) from []
>>(__warn+0xf0/0x11c)
>>[9.298763]  r9:d8053000 r8:00e9 r7:0009 r6:c0da3bdc
>>r5: r4:
>>[9.306662] [] (__warn) from []
>>(warn_slowpath_null+0x44/0x50)
>>[9.314383]  r8:d8053000 r7:0608 r6:c08873f8 r5:00e9 r4:c0da3bdc
>>[9.321243] [] (warn_slowpath_null) from []
>>(arp_rcv+0x1f8/0x228)
>>[9.329215]  r6:c0887200 r5:c107ac58 r4:d899b240
>>[9.333999] [] (arp_rcv) from []
>>(__netif_receive_skb_core+0x878/0xbd4)
>>[9.342491]  r6:c0887200 r5:c100ac8c r4:d899b240
>>[9.347265] [] (__netif_receive_skb_core) from
>>[] (__netif_receive_skb+0x2c/0x8c)
>>[9.356643]  r10:0080 r9:d8053000 r8:e0a26000 r7:c107ab0d
>>r6:c1008908 r5:d899b240
>>[9.364598]  r4:c10099c4
>>[9.367288] [] (__netif_receive_skb) from []
>>(netif_receive_skb_internal+0x7c/0x354)
>>[9.376904]  r5:d899b240 r4:c10099c4
>>[9.380635] [] (netif_receive_skb_internal) from
>>[] (napi_gro_receive+0x88/0xa4)
>>[9.389918]  r8:e0a26000 r7:0001 r6:d899b240 r5:d899b240 r4:0003
>>[9.396784] [] (napi_gro_receive) from []
>>(fec_enet_rx_napi+0x3a8/0x9b8)
>>[9.405357]  r5:d8054000 r4:
>>[9.409093] [] (fec_enet_rx_napi) from []
>>(net_rx_action+0x220/0x334)
>>[9.417431]  r10:dbbdfa00 r9:c1001d94 r8:0040 r7:012c
>>r6:8e6b r5:0001
>>[9.425384]  r4:d8053710
>>[9.428075] [] (net_rx_action) from []
>>(__do_softirq+0x128/0x2a0)
>>[9.436063]  r10:4003 r9:c1003080 r8:0100 r7:c100308c
>>r6:c100 r5:0003
>>[9.444018]  r4:
>>[9.446708] [] (__do_softirq) from []
>>(irq_exit+0x14c/0x1a8)
>>[9.454262]  r10:e080a000 r9:d8004400 r8:0001 r7:
>>r6:c1008a98 r5:
>>[9.462218]  r4:e000
>>[9.464911] [] (irq_exit) from []
>>(__handle_domain_irq+0x74/0xe8)
>>[9.472879]  r5: r4:c0f7cc24
>>[9.476614] [] (__handle_domain_irq) from []
>>(gic_handle_irq+0x64/0xc4)
>>[9.485121]  r9:c1028344 r8:c1001e98 r7: r6:03ff
>>r5:03eb r4:e080a00c
>>[9.493016] [] (gic_handle_irq) from []
>>(__irq_svc+0x70/0x98)
>>[9.500632] Exception stack(0xc1001e98 to 0xc1001ee0)
>>[9.505822] 1e80:
>>0001 0001
>>[9.514157] 1ea0:  c100bf80 25963796 0002 0002
>>dbbde5c8 26545294 0002
>>[9.522491] 1ec0:  c1001f14 c1001eb8 c1001ee8 c01724fc
>>c0724464 2153 
>>[9.530824]  r10: r9:c100 r8:26545294 r7:c1001ecc
>>r6: r5:2153
>>[9.538778]  r4:c0724464
>>[9.541470] [] (cpuidle_enter_state) from []
>>(cpuidle_enter+0x1c/0x20)
>>[9.549893]  r10:c100f6a8 r9:dbbde5c8 r8:c0f7c5c0 r7:c1008978
>>r6:0001 r5:c100892c
>>[9.557857]  r4:c100 r3:dbbde5c8
>>[9.561589] [] (cpuidle_enter) from []
>>(call_cpuidle+0x28/0x44)
>>[9.569399] [] (call_cpuidle) from []
>>(do_idle+0x1bc/0x230)
>>[9.576861] [] (do_idle) from []
>>(cpu_startup_entry+0x20/0x24)
>>[9.584587]  r10:c0f63a50 r9:c1008908 r8:c107b480 r7:c1008900
>>r6:c107b480 r5:0002
>>[9.592546]  r4:00c4 r3:c0f75354
>>[9.596283] [] (cpu_startup_entry) from []
>>(rest_init+0x210/0x25c)
>>[9.604372] [] (rest_init) from []
>>(start_kernel+0x390/0x418)
>>[9.611998]  r5: r4:c107b4cc
>>[9.615723] [] (start_kernel) from [<>] (  (null))
>>[9.622235]  r10:10c5387d r9:410fc075 r8:8300 r7:
>>r6:10c0387d r5:0051
>>[9.630191]  r4:c0f0032c
>>[9.632851] ---[ end trace 2d5d5f79c0c8da59 ]---
>>
>>Does anyone know how to fix it?
>>
>>Thanks
>
> If you enable kernel config "CONFIG_NETFILTER_FAMILY_ARP" can fix the warning.
> It is introduced by below commit.
>
> commit 8de98f058360722a1a9febe3970de6dcd4d91513
> Author: Florian Westphal 
> Date:   Thu Dec 7 16:28:26 2017 +0100
>
> netfilter: don't allocate space for arp/bridge hooks unless needed
>
> no need to define hook points if the family isn't supported.
> Because we need these hooks for either nftables, arp/ebtables
> or the 'call-iptables' hack we have in the bridge layer add two
> new dependencies, 

RE: WARNING: CPU: 0 PID: 0 at ./include/linux/netfilter.h:233 arp_rcv

2018-01-07 Thread Andy Duan
From: Marco Franchi  Sent: Friday, January 05, 2018 11:03 PM
>Hi,
>
>I am getting the following warning on a imx6ul-evk board running linux-next
>20180105:
>
>[9.233290] [ cut here ]
>[9.242068] WARNING: CPU: 0 PID: 0 at
>./include/linux/netfilter.h:233 arp_rcv+0x1f8/0x228
>[9.250381] Modules linked in:
>[9.253633] CPU: 0 PID: 0 Comm: swapper/0 Not tainted
>4.15.0-rc6-next-20180104-dirty #2
>[9.261764] Hardware name: Freescale i.MX6 Ultralite (Device Tree)
>[9.268065] Backtrace:
>[9.270719] [] (dump_backtrace) from []
>(show_stack+0x18/0x1c)
>[9.278438]  r7: r6:6153 r5: r4:c1079878
>[9.284258] [] (show_stack) from []
>(dump_stack+0xb4/0xe8)
>[9.291641] [] (dump_stack) from []
>(__warn+0xf0/0x11c)
>[9.298763]  r9:d8053000 r8:00e9 r7:0009 r6:c0da3bdc
>r5: r4:
>[9.306662] [] (__warn) from []
>(warn_slowpath_null+0x44/0x50)
>[9.314383]  r8:d8053000 r7:0608 r6:c08873f8 r5:00e9 r4:c0da3bdc
>[9.321243] [] (warn_slowpath_null) from []
>(arp_rcv+0x1f8/0x228)
>[9.329215]  r6:c0887200 r5:c107ac58 r4:d899b240
>[9.333999] [] (arp_rcv) from []
>(__netif_receive_skb_core+0x878/0xbd4)
>[9.342491]  r6:c0887200 r5:c100ac8c r4:d899b240
>[9.347265] [] (__netif_receive_skb_core) from
>[] (__netif_receive_skb+0x2c/0x8c)
>[9.356643]  r10:0080 r9:d8053000 r8:e0a26000 r7:c107ab0d
>r6:c1008908 r5:d899b240
>[9.364598]  r4:c10099c4
>[9.367288] [] (__netif_receive_skb) from []
>(netif_receive_skb_internal+0x7c/0x354)
>[9.376904]  r5:d899b240 r4:c10099c4
>[9.380635] [] (netif_receive_skb_internal) from
>[] (napi_gro_receive+0x88/0xa4)
>[9.389918]  r8:e0a26000 r7:0001 r6:d899b240 r5:d899b240 r4:0003
>[9.396784] [] (napi_gro_receive) from []
>(fec_enet_rx_napi+0x3a8/0x9b8)
>[9.405357]  r5:d8054000 r4:
>[9.409093] [] (fec_enet_rx_napi) from []
>(net_rx_action+0x220/0x334)
>[9.417431]  r10:dbbdfa00 r9:c1001d94 r8:0040 r7:012c
>r6:8e6b r5:0001
>[9.425384]  r4:d8053710
>[9.428075] [] (net_rx_action) from []
>(__do_softirq+0x128/0x2a0)
>[9.436063]  r10:4003 r9:c1003080 r8:0100 r7:c100308c
>r6:c100 r5:0003
>[9.444018]  r4:
>[9.446708] [] (__do_softirq) from []
>(irq_exit+0x14c/0x1a8)
>[9.454262]  r10:e080a000 r9:d8004400 r8:0001 r7:
>r6:c1008a98 r5:
>[9.462218]  r4:e000
>[9.464911] [] (irq_exit) from []
>(__handle_domain_irq+0x74/0xe8)
>[9.472879]  r5: r4:c0f7cc24
>[9.476614] [] (__handle_domain_irq) from []
>(gic_handle_irq+0x64/0xc4)
>[9.485121]  r9:c1028344 r8:c1001e98 r7: r6:03ff
>r5:03eb r4:e080a00c
>[9.493016] [] (gic_handle_irq) from []
>(__irq_svc+0x70/0x98)
>[9.500632] Exception stack(0xc1001e98 to 0xc1001ee0)
>[9.505822] 1e80:
>0001 0001
>[9.514157] 1ea0:  c100bf80 25963796 0002 0002
>dbbde5c8 26545294 0002
>[9.522491] 1ec0:  c1001f14 c1001eb8 c1001ee8 c01724fc
>c0724464 2153 
>[9.530824]  r10: r9:c100 r8:26545294 r7:c1001ecc
>r6: r5:2153
>[9.538778]  r4:c0724464
>[9.541470] [] (cpuidle_enter_state) from []
>(cpuidle_enter+0x1c/0x20)
>[9.549893]  r10:c100f6a8 r9:dbbde5c8 r8:c0f7c5c0 r7:c1008978
>r6:0001 r5:c100892c
>[9.557857]  r4:c100 r3:dbbde5c8
>[9.561589] [] (cpuidle_enter) from []
>(call_cpuidle+0x28/0x44)
>[9.569399] [] (call_cpuidle) from []
>(do_idle+0x1bc/0x230)
>[9.576861] [] (do_idle) from []
>(cpu_startup_entry+0x20/0x24)
>[9.584587]  r10:c0f63a50 r9:c1008908 r8:c107b480 r7:c1008900
>r6:c107b480 r5:0002
>[9.592546]  r4:00c4 r3:c0f75354
>[9.596283] [] (cpu_startup_entry) from []
>(rest_init+0x210/0x25c)
>[9.604372] [] (rest_init) from []
>(start_kernel+0x390/0x418)
>[9.611998]  r5: r4:c107b4cc
>[9.615723] [] (start_kernel) from [<>] (  (null))
>[9.622235]  r10:10c5387d r9:410fc075 r8:8300 r7:
>r6:10c0387d r5:0051
>[9.630191]  r4:c0f0032c
>[9.632851] ---[ end trace 2d5d5f79c0c8da59 ]---
>
>Does anyone know how to fix it?
>
>Thanks

If you enable kernel config "CONFIG_NETFILTER_FAMILY_ARP" can fix the warning.
It is introduced by below commit.

commit 8de98f058360722a1a9febe3970de6dcd4d91513
Author: Florian Westphal 
Date:   Thu Dec 7 16:28:26 2017 +0100

netfilter: don't allocate space for arp/bridge hooks unless needed

no need to define hook points if the family isn't supported.
Because we need these hooks for either nftables, arp/ebtables
or the 'call-iptables' hack we have in the bridge layer add two
new dependencies, NETFILTER_FAMILY_{ARP,BRIDGE}, and have the
users select them.

Signed-off-by: Florian Westphal 
Signed-off-by: Pablo Neira Ayuso 

diff --git