linux/drivers/net/ethernet/microchip
Vladimir Oltean c35b57ceff net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by drivers towards the bridge
The blamed commit added a new field to struct switchdev_notifier_fdb_info,
but did not make sure that all call paths set it to something valid.
For example, a switchdev driver may emit a SWITCHDEV_FDB_ADD_TO_BRIDGE
notifier, and since the 'is_local' flag is not set, it contains junk
from the stack, so the bridge might interpret those notifications as
being for local FDB entries when that was not intended.

To avoid that now and in the future, zero-initialize all
switchdev_notifier_fdb_info structures created by drivers such that all
newly added fields to not need to touch drivers again.

Fixes: 2c4eca3ef7 ("net: bridge: switchdev: include local flag in FDB notifications")
Reported-by: Ido Schimmel <idosch@idosch.org>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Karsten Graul <kgraul@linux.ibm.com>
Link: https://lore.kernel.org/r/20210810115024.1629983-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-08-10 13:22:57 -07:00
..
sparx5 net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by drivers towards the bridge 2021-08-10 13:22:57 -07:00
enc28j60_hw.h
enc28j60.c netdev: pass the stuck queue to the timeout handler 2019-12-12 21:38:57 -08:00
encx24j600_hw.h net: encx24j600: fix kernel-doc syntax in file headers 2021-05-20 15:25:38 -07:00
encx24j600-regmap.c drivers/net/ethernet: clean up mis-targeted comments 2020-09-25 16:29:00 -07:00
encx24j600.c net: encx24j600: fix kernel-doc syntax in file headers 2021-05-20 15:25:38 -07:00
Kconfig net: sparx5: add the basic sparx5 driver 2021-06-24 11:28:12 -07:00
lan743x_ethtool.c lan743x: remove redundant intializations of pointers adapter and phydev 2021-03-29 10:56:41 -07:00
lan743x_ethtool.h lan743x: Add support for ethtool get_drvinfo 2018-07-23 14:09:18 -07:00
lan743x_main.c of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
lan743x_main.h lan743x: boost performance on cpu archs w/o dma cache snooping 2021-02-16 15:08:48 -08:00
lan743x_ptp.c lan743x: Added fixed link and RGMII support 2020-06-01 11:51:17 -07:00
lan743x_ptp.h Support LAN743x PTP periodic output on any GPIO 2019-11-11 12:46:56 -08:00
Makefile net: sparx5: add the basic sparx5 driver 2021-06-24 11:28:12 -07:00