Hello all, On Sat, Mar 30, 2013 at 05:36:35PM +0800, Fengguang Wu wrote: > Greetings, > > I got the below WARNING in net-next/master (head commit f498354793d5) > and the first bad commit is > > commit c54419321455631079c7d6e60bc732dd0c5914c5 > Author: Pravin B Shelar > Date: Mon Mar 25 14:49:35 2013 +0000 > > GRE: Refactor GRE tunneling code. > > Following patch refactors GRE code into ip tunneling code and GRE > specific code. Common tunneling code is moved to ip_tunnel module. > ip_tunnel module is written as generic library which can be used > by different tunneling implementations. > > ip_tunnel module contains following components: > - packet xmit and rcv generic code. xmit flow looks like > (gre_xmit/ipip_xmit)->ip_tunnel_xmit->ip_local_out. > - hash table of all devices. > - lookup for tunnel devices. > - control plane operations like device create, destroy, ioctl, netlink > operations code. > - registration for tunneling modules, like gre, ipip etc. > - define single pcpu_tstats dev->tstats. > - struct tnl_ptk_info added to pass parsed tunnel packet parameters. > > ipip.h header is renamed to ip_tunnel.h > > Signed-off-by: Pravin B Shelar > Signed-off-by: David S. Miller > > [ 27.507156] libceph: loaded (mon/osd proto 15/24) > [ 27.515409] ------------[ cut here ]------------ > [ 27.518917] WARNING: at /c/kernel-tests/src/stable/net/batman-adv/hard-interface.c:92 batadv_is_on_batman_iface+0x5c/0x7a() > [ 27.521935] Hardware name: Bochs > [ 27.525356] Cannot find parent device > [ 27.528296] Modules linked in: > [ 27.529923] Pid: 1, comm: swapper/0 Not tainted 3.9.0-rc4-00896-g03ba910 #794 > [ 27.531747] Call Trace: > [ 27.534683] [] warn_slowpath_common+0x83/0x9e > [ 27.536338] [] warn_slowpath_fmt+0x46/0x48 > [ 27.537872] [] ? rcu_read_unlock+0x1c/0x2d > [ 27.539441] [] ? local_clock+0x19/0x52 > [ 27.541023] [] batadv_is_on_batman_iface+0x5c/0x7a > [ 27.542803] [] batadv_hard_if_event+0x8f/0x285 > [ 27.544551] [] register_netdevice_notifier+0x71/0x17e > [ 27.550617] [] ? batadv_iv_init+0x3f/0x3f > [ 27.552248] [] batadv_init+0xe4/0x104 > [ 27.553770] [] do_one_initcall+0x7f/0x13d > [ 27.555386] [] kernel_init_freeable+0x141/0x1d0 > [ 27.557177] [] ? do_early_param+0x8c/0x8c > [ 27.558813] [] ? rest_init+0xda/0xda > [ 27.560348] [] kernel_init+0xe/0xdb > [ 27.561813] [] ret_from_fork+0x7c/0xb0 > [ 27.563356] [] ? rest_init+0xda/0xda > [ 27.564974] ---[ end trace f78f9f0651ffcb0b ]--- > The reason why batman-adv it raising this warning is because this call is returning NULL: dev_get_by_index(&init_net, net_dev->iflink); net_dev is an interface that has been registered now and batman-adv is trying to analyse it to decide if it is a potential candidate for its virtual device or not. To the best of my knowledge, if the function above is returning NULL, it means that the iflink attribute contains a broken value. Am I wrong or iflink should never contain 0? If there is no parent device it should contain the same value of ifindex. Right? Regards, -- Antonio Quartulli ..each of us alone is worth nothing.. Ernesto "Che" Guevara