linux_dsm_epyc7002/drivers/net/ethernet
Ivan Mironov 38355a5f9a bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw
This happened when I tried to boot normal Fedora 29 system with latest
available kernel (from fedora rawhide, plus some unrelated custom
patches):

	BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
	PGD 0 P4D 0
	Oops: 0010 [#1] SMP PTI
	CPU: 6 PID: 1422 Comm: libvirtd Tainted: G          I       4.20.0-0.rc7.git3.hpsa2.1.fc29.x86_64 #1
	Hardware name: HP ProLiant BL460c G6, BIOS I24 05/21/2018
	RIP: 0010:          (null)
	Code: Bad RIP value.
	RSP: 0018:ffffa47ccdc9fbe0 EFLAGS: 00010246
	RAX: 0000000000000000 RBX: 00000000000003e8 RCX: ffffa47ccdc9fbf8
	RDX: ffffa47ccdc9fc00 RSI: ffff97d9ee7b01f8 RDI: ffff97d9f0150b80
	RBP: ffff97d9f0150b80 R08: 0000000000000000 R09: 0000000000000000
	R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000003
	R13: ffff97d9ef1e53e8 R14: 0000000000000009 R15: ffff97d9f0ac6730
	FS:  00007f4d224ef700(0000) GS:ffff97d9fa200000(0000) knlGS:0000000000000000
	CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
	CR2: ffffffffffffffd6 CR3: 00000011ece52006 CR4: 00000000000206e0
	Call Trace:
	 ? bnx2x_chip_cleanup+0x195/0x610 [bnx2x]
	 ? bnx2x_nic_unload+0x1e2/0x8f0 [bnx2x]
	 ? bnx2x_reload_if_running+0x24/0x40 [bnx2x]
	 ? bnx2x_set_features+0x79/0xa0 [bnx2x]
	 ? __netdev_update_features+0x244/0x9e0
	 ? netlink_broadcast_filtered+0x136/0x4b0
	 ? netdev_update_features+0x22/0x60
	 ? dev_disable_lro+0x1c/0xe0
	 ? devinet_sysctl_forward+0x1c6/0x211
	 ? proc_sys_call_handler+0xab/0x100
	 ? __vfs_write+0x36/0x1a0
	 ? rcu_read_lock_sched_held+0x79/0x80
	 ? rcu_sync_lockdep_assert+0x2e/0x60
	 ? __sb_start_write+0x14c/0x1b0
	 ? vfs_write+0x159/0x1c0
	 ? vfs_write+0xba/0x1c0
	 ? ksys_write+0x52/0xc0
	 ? do_syscall_64+0x60/0x1f0
	 ? entry_SYSCALL_64_after_hwframe+0x49/0xbe

After some investigation I figured out that recently added cleanup code
tries to call VLAN filtering de-initialization function which exist only
for newer hardware. Corresponding function pointer is not
set (== 0) for older hardware, namely these chips:

	#define CHIP_NUM_57710			0x164e
	#define CHIP_NUM_57711			0x164f
	#define CHIP_NUM_57711E			0x1650

And I have one of those in my test system:

	Broadcom Inc. and subsidiaries NetXtreme II BCM57711E 10-Gigabit PCIe [14e4:1650]

Function bnx2x_init_vlan_mac_fp_objs() from
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h decides whether to
initialize relevant pointers in bnx2x_sp_objs.vlan_obj or not.

This regression was introduced after v4.20-rc7, and still exists in v4.20
release.

Fixes: 04f05230c5 ("bnx2x: Remove configured vlans as part of unload sequence.")
Signed-off-by: Ivan Mironov <mironov.ivan@gmail.com>
Signed-off-by: Ivan Mironov <mironov.ivan@gmail.com>
Acked-by: Sudarsana Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-12-24 14:45:51 -08:00
..
3com
8390
adaptec
aeroflex
agere
alacritech net: ethernet: slicoss: remove duplicated include from slic.h 2018-09-18 19:57:40 -07:00
allwinner
alteon
altera
amazon net: ena: update driver version from 2.0.1 to 2.0.2 2018-11-19 15:13:00 -08:00
amd net: amd: add missing of_node_put() 2018-11-23 17:24:24 -08:00
apm drivers: net: xgene: Remove unnecessary forward declarations 2018-12-14 13:35:27 -08:00
apple net: apple: fix return type of ndo_start_xmit function 2018-09-21 19:15:15 -07:00
aquantia net: aquantia: fix rx checksum offload bits 2018-11-30 13:18:45 -08:00
arc
atheros net: alx: make alx_drv_name static 2018-11-05 17:12:58 -08:00
aurora
broadcom bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw 2018-12-24 14:45:51 -08:00
brocade bna: Remove unnecessary self assignment 2018-09-21 19:02:05 -07:00
cadence net: macb: add missing barriers when reading descriptors 2018-12-18 16:17:48 -08:00
calxeda
cavium liquidio: read sc->iq_no before release sc 2018-11-30 17:20:39 -08:00
chelsio crypto/chelsio/chtls: macro correction in tx path 2018-12-14 13:39:39 -08:00
cirrus net: cirrus: fix return type of ndo_start_xmit function 2018-09-21 19:15:14 -07:00
cisco
cortina net: gemini: Fix copy/paste error 2018-11-23 22:35:38 -08:00
davicom net: ethernet: davicom: dm9000: simplify getting .driver_data 2018-10-21 21:10:12 -07:00
dec
dlink
emulex pci-v4.20-changes 2018-10-25 06:50:48 -07:00
ezchip
faraday net: faraday: ftmac100: remove netif_running(netdev) check before disabling interrupts 2018-11-21 16:57:39 -08:00
freescale ethernet: fman: fix wrong of_node_put() in probe function 2018-12-04 20:42:35 -08:00
fujitsu
hisilicon net: hns: Fix ping failed when use net bridge and send multicast 2018-12-16 12:07:32 -08:00
hp
huawei hinic: Fix l4_type parameter in hinic_task_set_tunnel_l4 2018-10-29 20:43:40 -07:00
i825xx net: i825xx: fix return type of ndo_start_xmit function 2018-09-21 19:15:15 -07:00
ibm ibmvnic: Fix non-atomic memory allocation in IRQ context 2018-12-10 17:34:25 -08:00
intel ixgbe: Fix race when the VF driver does a reset 2018-12-12 15:51:50 -08:00
marvell net: mvpp2: fix the phylink mode validation 2018-12-19 16:38:35 -08:00
mediatek net: phy: Add helper for advertise to lcl value 2018-10-01 22:55:36 -07:00
mellanox net/mlx5e: Remove the false indication of software timestamping support 2018-12-19 13:31:16 -08:00
micrel net: micrel: fix return type of ndo_start_xmit function 2018-09-21 19:11:39 -07:00
microchip lan743x: Remove MAC Reset from initialization 2018-12-19 15:48:11 -08:00
moxa
mscc mscc: Configured MAC entries should be locked. 2018-12-20 16:22:45 -08:00
myricom drivers: net: remove <net/busy_poll.h> inclusion when not needed 2018-10-25 16:20:02 -07:00
natsemi
neterion vxge: ensure data0 is initialized in when fetching firmware version information 2018-12-18 22:00:40 -08:00
netronome nfp: flower: ensure TCP flags can be placed in IPv6 frame 2018-12-10 17:45:41 -08:00
ni net: nixge: Address compiler warnings when building for i386 2018-10-01 22:48:08 -07:00
nuvoton w90p910_ether: remove incorrect __init annotation 2018-12-14 14:42:51 -08:00
nvidia
nxp net: ethernet: lpc_eth: add device and device node local variables 2018-10-19 17:04:38 -07:00
oki-semi
packetengines
pasemi
qlogic net: netxen: fix a missing check and an uninitialized use 2018-12-21 09:01:47 -08:00
qualcomm net: qualcomm: rmnet: Fix incorrect assignment of real_dev 2018-11-09 19:45:48 -08:00
rdc
realtek r8169: fix crash if CONFIG_DEBUG_SHIRQ is enabled 2018-12-11 22:54:19 -08:00
renesas Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-09-25 10:35:29 -07:00
rocker rocker: Drop pointless static qualifier 2018-10-19 10:42:19 -07:00
samsung
seeq net: seeq: fix return type of ndo_start_xmit function 2018-09-21 19:15:14 -07:00
sfc pci-v4.20-changes 2018-10-25 06:50:48 -07:00
sgi net: sgi: fix return type of ndo_start_xmit function 2018-09-21 19:15:14 -07:00
silan
sis
smsc net: ethernet: smsc: smc91x: simplify getting .driver_data 2018-10-21 21:10:12 -07:00
socionext net: ethernet: ave: Add MODULE_AUTHOR and MAINTAINERS entry 2018-11-29 10:38:39 -08:00
stmicro net: stmmac: Fix an error code in probe() 2018-12-18 15:45:28 -08:00
sun net: sun: fix return type of ndo_start_xmit function 2018-09-19 21:17:58 -07:00
synopsys
tehuti
ti net: ethernet: ti: cpsw: unsync mcast entries while switch promisc mode 2018-10-22 20:20:14 -07:00
toshiba net: toshiba: remove a redundant local variable 'index_specified' 2018-09-19 23:08:36 -07:00
tundra
via net: via: via-velocity: fix spelling mistake "alignement" -> "alignment" 2018-11-27 16:22:23 -08:00
wiznet net: ethernet: wiznet: w5300: simplify getting .driver_data 2018-10-21 21:10:12 -07:00
xilinx net: xilinx: fix return type of ndo_start_xmit function 2018-09-19 21:17:58 -07:00
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c net: lantiq: Fix returned value in case of error in 'xrx200_probe()' 2018-11-16 19:46:49 -08:00
Makefile
netx-eth.c