linux/drivers/net/ethernet/microchip/sparx5
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
..
Kconfig net: sparx5: fix unmet dependencies warning 2021-07-22 00:44:32 -07:00
Makefile net: sparx5: add ethtool configuration and statistics support 2021-06-24 11:28:13 -07:00
sparx5_calendar.c net: sparx5: add calendar bandwidth allocation support 2021-06-24 11:28:13 -07:00
sparx5_ethtool.c net: sparx5: add ethtool configuration and statistics support 2021-06-24 11:28:13 -07:00
sparx5_mactable.c net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by drivers towards the bridge 2021-08-10 13:22:57 -07:00
sparx5_main_regs.h
sparx5_main.c net: sparx5: Do not use mac_addr uninitialized in mchp_sparx5_probe() 2021-06-28 15:50:21 -07:00
sparx5_main.h net: sparx5: add ethtool configuration and statistics support 2021-06-24 11:28:13 -07:00
sparx5_netdev.c net: sparx5: fix bitmask on 32-bit targets 2021-08-03 11:52:37 +01:00
sparx5_packet.c net: sparx5: add switching support 2021-06-24 11:28:13 -07:00
sparx5_phylink.c net: sparx5: add port module support 2021-06-24 11:28:12 -07:00
sparx5_port.c net: sparx5: add port module support 2021-06-24 11:28:12 -07:00
sparx5_port.h net: sparx5: add port module support 2021-06-24 11:28:12 -07:00
sparx5_switchdev.c net: sparx5: fix error return code in sparx5_register_notifier_blocks() 2021-06-28 14:20:23 -07:00
sparx5_vlan.c net: sparx5: add vlan support 2021-06-24 11:28:13 -07:00