linux_dsm_epyc7002/drivers/net/ethernet
Petr Machata ec9efb523c rocker: Postpone filtering of !added_by_user FDB
Breaking out of the switch in rocker_switchdev_event() still ends up
scheduling work, except an ill-defined one. This leads to an OOPS cited
below. Fix by postponing the check until rocker_switchdev_event_work().

[   23.148476] BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
[   23.148810] PGD 0 P4D 0
[   23.148982] Oops: 0000 [#1] PREEMPT SMP PTI
[   23.149190] Modules linked in: bridge stp llc iptable_nat nf_nat_ipv4 nf_nat e1000 rocker
[   23.149768] CPU: 0 PID: 239 Comm: kworker/u2:4 Not tainted 4.17.0-rc3-net_next_queue-custom #6
[   23.150298] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-2.fc27 04/01/2014
[   23.150868] Workqueue: rocker rocker_switchdev_event_work [rocker]
[   23.151258] RIP: 0010:ofdpa_port_fdb+0x7b/0x230 [rocker]
[   23.151597] RSP: 0018:ffffc900004b3e18 EFLAGS: 00010246
[   23.151952] RAX: 00000000fffbc68c RBX: 0000000000000000 RCX: 0000000000000000
[   23.152363] RDX: 0000000000000010 RSI: ffff88003b4471e0 RDI: 00000000ffffffff
[   23.152768] RBP: ffff88003b4471c0 R08: ffff88003b4471e0 R09: ffff88003b4471c0
[   23.153141] R10: 0000000000000000 R11: 0000000000000000 R12: ffff880036caf000
[   23.153515] R13: 0000000000000000 R14: 0000000000000000 R15: ffff88003bc00000
[   23.153919] FS:  0000000000000000(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000
[   23.154444] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   23.154806] CR2: 0000000000000000 CR3: 0000000036eb6000 CR4: 00000000000006f0
[   23.155194] Call Trace:
[   23.155472]  rocker_switchdev_event_work+0x9b/0xd0 [rocker]
[   23.155850]  ? __schedule+0x231/0x700
[   23.156175]  process_one_work+0x1cf/0x3e0
[   23.156490]  worker_thread+0x26/0x3d0
[   23.156795]  ? trace_event_raw_event_workqueue_execute_start+0x80/0x80
[   23.157181]  kthread+0x10e/0x130
[   23.157485]  ? kthread_create_worker_on_cpu+0x40/0x40
[   23.157824]  ret_from_fork+0x35/0x40
[   23.158174] Code: 00 00 c1 e8 02 4c 8d 45 20 bf ff ff ff ff 83 e0 01 4c 89 65 20 88 45 14 48 8b 05 21 da 1f e2 4c 89 c6 4c 89 44 24 10 48 89 45 18 <41> 8b 45 00 89 45 28 41 0f b7 45 04 66 89 45 2c 0f b7 44 24 04
[   23.159346] RIP: ofdpa_port_fdb+0x7b/0x230 [rocker] RSP: ffffc900004b3e18
[   23.159742] CR2: 0000000000000000
[   23.160088] ---[ end trace f9b16d4cb6df0629 ]---

Fixes: 816a3bed95 ("switchdev: Add fdb.added_by_user to switchdev notifications")
Suggested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-05-10 17:54:57 -04:00
..
3com net: 3com: 3c59x: irq save variant of ISR 2018-05-07 23:25:25 -04:00
8390 net-next: New ax88796 platform driver for Amiga X-Surf 100 Zorro board (m68k) 2018-04-19 16:11:11 -04:00
adaptec
aeroflex
agere
alacritech
allwinner
alteon
altera ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
amazon net: ena: Eliminate duplicate barriers on weakly-ordered archs 2018-03-26 12:47:56 -04:00
amd net: amd8111e: remove redundant duplicated if statement 2018-04-25 14:11:27 -04:00
apm
apple
aquantia net: aquantia: oops when shutdown on already stopped device 2018-04-11 10:41:36 -04:00
arc
atheros
aurora
broadcom bnxt_en: Always forward VF MAC address to the PF. 2018-05-08 10:14:22 -04:00
brocade ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
cadence treewide: fix up files incorrectly marked executable 2018-04-07 13:31:23 -07:00
calxeda
cavium liquidio: bump up driver version to 1.7.2 to match newer NIC firmware 2018-05-10 17:32:18 -04:00
chelsio cxgb4: fix the wrong conversion of Mbps to Kbps 2018-05-10 17:52:02 -04:00
cirrus
cisco
cortina
davicom treewide: simplify Kconfig dependencies for removed archs 2018-03-26 15:55:57 +02:00
dec
dlink
emulex ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
ezchip
faraday
freescale Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-04 09:58:56 -04:00
fujitsu
hisilicon net: hns3: refactor the loopback related function 2018-05-10 17:27:10 -04:00
hp
huawei net-next/hinic: add pci device ids for 25ge and 100ge card 2018-05-08 00:07:42 -04:00
i825xx
ibm ibmvnic: Clean actual number of RX or TX pools 2018-04-22 21:13:30 -04:00
intel fm10k: don't protect fm10k_queue_mac_request by fm10k_host_mbx_ready 2018-05-09 09:02:48 -07:00
marvell net: mvpp2: Fix clock resource by adding missing mg_core_clk 2018-04-27 11:22:55 -04:00
mediatek net: mediatek: use of_device_get_match_data() 2018-04-16 13:43:07 -04:00
mellanox mlxsw: spectrum_span: Support VLAN under mirror-to-gretap 2018-05-10 17:50:52 -04:00
micrel
microchip
moxa
myricom ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
natsemi Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-23 11:31:58 -04:00
neterion
netronome Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2018-05-07 23:35:08 -04:00
ni net: ethernet: nixge: Add support for National Instruments XGE netdev 2018-03-29 11:51:00 -04:00
nuvoton
nvidia
nxp
oki-semi
packetengines
pasemi
qlogic qed: Add support for Unified Fabric Port. 2018-05-07 23:46:10 -04:00
qualcomm net: qualcomm: rmnet: Fix warning seen with fill_info 2018-04-18 21:23:06 -04:00
rdc
realtek Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-04 09:58:56 -04:00
renesas sh_eth: WARN_ON() access to unimplemented TSU register 2018-05-04 09:11:45 -04:00
rocker rocker: Postpone filtering of !added_by_user FDB 2018-05-10 17:54:57 -04:00
samsung ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
seeq
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-04 09:58:56 -04:00
sgi
silan
sis
smsc arch: remove obsolete architecture ports 2018-04-02 20:20:12 -07:00
socionext net: ethernet: ave: add support for phy-mode setting of system controller 2018-04-20 10:49:41 -04:00
stmicro net: stmmac: Add support for U32 TC filter using Flexible RX Parser 2018-05-10 14:16:36 -04:00
sun ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
synopsys
tehuti
ti drivers: net: davinci_mdio: prevent spurious timeout 2018-05-10 16:18:59 -04:00
toshiba
tundra
via
wiznet
xilinx
xircom
xscale
dnet.c
dnet.h
ec_bhf.c ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-04-03 14:04:18 -07:00
korina.c
lantiq_etop.c
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-04-03 14:04:18 -07:00
netx-eth.c