linux-stable/drivers/net
Grygorii Strashko ae03d189ba net: ethernet: ti: am65-cpsw: fix crash in am65_cpsw_port_offload_fwd_mark_update()
The am65_cpsw_port_offload_fwd_mark_update() causes NULL exception crash
when there is at least one disabled port and any other port added to the
bridge first time.

Unable to handle kernel NULL pointer dereference at virtual address 0000000000000858
pc : am65_cpsw_port_offload_fwd_mark_update+0x54/0x68
lr : am65_cpsw_netdevice_event+0x8c/0xf0
Call trace:
am65_cpsw_port_offload_fwd_mark_update+0x54/0x68
notifier_call_chain+0x54/0x98
raw_notifier_call_chain+0x14/0x20
call_netdevice_notifiers_info+0x34/0x78
__netdev_upper_dev_link+0x1c8/0x290
netdev_master_upper_dev_link+0x1c/0x28
br_add_if+0x3f0/0x6d0 [bridge]

Fix it by adding proper check for port->ndev != NULL.

Fixes: 2934db9bcb ("net: ti: am65-cpsw-nuss: Add netdevice notifiers")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-05 13:33:23 +01:00
..
appletalk
arcnet
bonding bonding: fix build issue 2021-07-16 17:22:35 -07:00
caif Networking fixes for 5.14-rc2, including fixes from bpf and netfilter. 2021-07-14 09:24:32 -07:00
can can: esd_usb2: fix memory leak 2021-07-30 08:47:34 +02:00
dsa net: dsa: qca: ar9331: reorder MDIO write sequence 2021-08-03 14:35:28 -07:00
ethernet net: ethernet: ti: am65-cpsw: fix crash in am65_cpsw_port_offload_fwd_mark_update() 2021-08-05 13:33:23 +01:00
fddi net: fddi: fix UAF in fza_probe 2021-07-13 09:43:50 -07:00
fjes Tracing updates for 5.14: 2021-07-03 11:13:22 -07:00
hamradio TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
hippi
hyperv Networking changes for 5.14. 2021-06-30 15:51:09 -07:00
ieee802154 ieee802154: hwsim: avoid possible crash in hwsim_del_edge_nl() 2021-06-22 21:26:59 +02:00
ipa Merge branch 'akpm' (patches from Andrew) 2021-07-02 12:08:10 -07:00
ipvlan
mdio net: mdiobus: withdraw fwnode_mdbiobus_register 2021-06-25 11:46:29 -07:00
mhi net: really fix the build... 2021-08-03 11:14:03 +01:00
netdevsim net: netdevsim: use xso.real_dev instead of xso.dev in callback functions of struct xfrmdev_ops 2021-07-06 10:36:59 -07:00
pcs
phy net: phy: micrel: Fix detection of ksz87xx switch 2021-08-02 15:07:49 +01:00
plip
ppp TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
slip TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
team
usb net: usb: lan78xx: don't modify phy_device state concurrently 2021-08-04 12:51:14 +01:00
vmxnet3 vmxnet3: fix cksum offload issues for tunnels with non-default udp ports 2021-07-02 13:41:15 -07:00
wan Networking fixes for 5.14-rc2, including fixes from bpf and netfilter. 2021-07-14 09:24:32 -07:00
wireguard
wireless virt_wifi: fix error on connect 2021-07-23 10:34:31 +02:00
wwan net: wwan: iosm: fix recursive lock acquire in unregister 2021-08-05 11:28:55 +01:00
xen-netback
Kconfig
LICENSE.SRC
Makefile
Space.c
bareudp.c bareudp: allow redirecting bareudp packets to eth devices 2021-06-28 12:44:17 -07:00
dummy.c
eql.c
geneve.c
gtp.c gtp: reset mac_header after decap 2021-06-28 12:44:17 -07:00
ifb.c
loopback.c
macsec.c net: macsec: fix the length used to copy the key for offloading 2021-06-24 12:41:12 -07:00
macvlan.c
macvtap.c
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c
virtio_net.c Networking fixes for 5.14-rc2, including fixes from bpf and netfilter. 2021-07-14 09:24:32 -07:00
vrf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-06-29 15:45:27 -07:00
vsockmon.c
vxlan.c vxlan: add missing rcu_read_lock() in neigh_reduce() 2021-06-22 09:48:38 -07:00
xen-netfront.c