From mboxrd@z Thu Jan 1 00:00:00 1970 From: Calvin Owens Subject: [PATCH] netconsole: Initialize after all core networking drivers Date: Thu, 17 Dec 2015 15:52:39 -0800 Message-ID: <20151217235239.GA1444048@devbig337.prn1.facebook.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Cc: , , , To: , , , , Return-path: Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org With built-in netconsole and IXGBE, configuring netconsole via the kernel cmdline results in the following panic at boot: netpoll: netconsole: device eth0 not up yet, forcing it usb 2-1: new high-speed USB device number 2 using ehci-pci ixgbe 0000:03:00.0: registered PHC device on eth0 BUG: unable to handle kernel NULL pointer dereference at 0000000000000810 Call Trace: [] ? vxlan_get_rx_port+0x41/0xa0 [] ixgbe_open+0x4e8/0x540 [] __dev_open+0xac/0x120 [] dev_open+0x36/0x70 [] netpoll_setup+0x23c/0x300 [] ? netpoll_parse_options+0x19a/0x200 [] ? option_setup+0x1f/0x1f [] init_netconsole+0xda/0x262 [] ? option_setup+0x1f/0x1f [] do_one_initcall+0x88/0x1b0 [] kernel_init_freeable+0x14a/0x1e3 [] ? do_early_param+0x8c/0x8c [] ? rest_init+0x80/0x80 [] kernel_init+0xe/0xe0 [] ret_from_fork+0x3f/0x70 [] ? rest_init+0x80/0x80 This happens because IXGBE assumes that vxlan has already been initialized. The cleanest way to fix this is to just initialize netconsole after all the other core networking stuff has completed. Signed-off-by: Calvin Owens --- drivers/net/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 900b0c5..31557d0 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -15,7 +15,6 @@ obj-$(CONFIG_MACVTAP) += macvtap.o obj-$(CONFIG_MII) += mii.o obj-$(CONFIG_MDIO) += mdio.o obj-$(CONFIG_NET) += Space.o loopback.o -obj-$(CONFIG_NETCONSOLE) += netconsole.o obj-$(CONFIG_PHYLIB) += phy/ obj-$(CONFIG_RIONET) += rionet.o obj-$(CONFIG_NET_TEAM) += team/ @@ -26,6 +25,7 @@ obj-$(CONFIG_VXLAN) += vxlan.o obj-$(CONFIG_GENEVE) += geneve.o obj-$(CONFIG_NLMON) += nlmon.o obj-$(CONFIG_NET_VRF) += vrf.o +obj-$(CONFIG_NETCONSOLE) += netconsole.o # # Networking Drivers -- 2.5.0