linux/drivers/net
Volodymyr Mytnyk 5dca8eff46 net: marvell: prestera: fix double free issue on err path
[ Upstream commit e8d032507c ]

fix error path handling in prestera_bridge_port_join() that
cases prestera driver to crash (see below).

 Trace:
   Internal error: Oops: 96000044 [#1] SMP
   Modules linked in: prestera_pci prestera uio_pdrv_genirq
   CPU: 1 PID: 881 Comm: ip Not tainted 5.15.0 #1
   pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
   pc : prestera_bridge_destroy+0x2c/0xb0 [prestera]
   lr : prestera_bridge_port_join+0x2cc/0x350 [prestera]
   sp : ffff800011a1b0f0
   ...
   x2 : ffff000109ca6c80 x1 : dead000000000100 x0 : dead000000000122
    Call trace:
   prestera_bridge_destroy+0x2c/0xb0 [prestera]
   prestera_bridge_port_join+0x2cc/0x350 [prestera]
   prestera_netdev_port_event.constprop.0+0x3c4/0x450 [prestera]
   prestera_netdev_event_handler+0xf4/0x110 [prestera]
   raw_notifier_call_chain+0x54/0x80
   call_netdevice_notifiers_info+0x54/0xa0
   __netdev_upper_dev_link+0x19c/0x380

Fixes: e1189d9a5f ("net: marvell: prestera: Add Switchdev driver implementation")
Signed-off-by: Volodymyr Mytnyk <vmytnyk@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-12-01 09:19:04 +01:00
..
appletalk
arcnet
bonding bonding: Fix a use-after-free problem when bond_sysfs_slave_add() failed 2021-11-18 14:04:26 +01:00
caif
can can: mcp251xfd: mcp251xfd_chip_start(): fix error handling for mcp251xfd_chip_rx_int_enable() 2021-11-18 14:04:26 +01:00
dsa net: dsa: rtl8366rb: Fix off-by-one bug 2021-11-18 14:04:03 +01:00
ethernet net: marvell: prestera: fix double free issue on err path 2021-12-01 09:19:04 +01:00
fddi
fjes
hamradio net: 6pack: Fix tx timeout and slot time 2021-09-30 10:11:07 +02:00
hippi
hyperv
ieee802154 ieee802154: hwsim: fix GPF in hwsim_new_edge_nl 2021-08-18 08:59:07 +02:00
ipa net: ipa: disable HOLB drop when updating timer 2021-11-26 10:39:14 +01:00
ipvlan
mdio mdio: aspeed: Fix "Link is Down" issue 2021-12-01 09:19:01 +01:00
netdevsim
pcs
phy net: phy: fix duplex out of sync problem while changing settings 2021-11-18 14:04:26 +01:00
plip
ppp ppp: Fix generating ifname when empty IFLA_IFNAME is specified 2021-08-18 08:59:10 +02:00
slip
team
usb net: lan78xx: fix division by zero in send path 2021-11-02 19:48:20 +01:00
vmxnet3 vmxnet3: do not stop tx queues after netif_device_detach() 2021-11-18 14:03:43 +01:00
wan
wimax
wireguard
wireless ath10k: fix invalid dma_addr_t token assignment 2021-11-18 14:04:32 +01:00
xen-netback xen-netback: correct success/error reporting for the SKB-with-fraglist case 2021-10-09 14:40:56 +02:00
bareudp.c bareudp: Fix invalid read beyond skb's linear data 2021-08-18 08:59:11 +02:00
dummy.c
eql.c
geneve.c
gtp.c
ifb.c ifb: fix building without CONFIG_NET_CLS_ACT 2021-11-18 14:03:49 +01:00
Kconfig ifb: Depend on netfilter alternatively to tc 2021-11-18 14:03:46 +01:00
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: fix bonding active backup with arp monitoring 2021-11-26 10:39:18 +01:00
veth.c
virtio_net.c virtio-net: use NETIF_F_GRO_HW instead of NETIF_F_LRO 2021-08-26 08:35:48 -04:00
vrf.c vrf: run conntrack only in context of lower/physdev for locally generated packets 2021-11-18 14:04:00 +01:00
vsockmon.c
vxlan.c
xen-netfront.c xen/netfront: stop tx queues during live migration 2021-11-18 14:03:42 +01:00