linux/drivers/s390
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
..
block block-5.14-2021-07-08 2021-07-09 12:05:33 -07:00
char s390: Fix fall-through warnings for Clang 2021-07-13 14:43:09 -05:00
cio s390/qdio: get rid of register asm 2021-06-28 11:18:29 +02:00
crypto s390/ap: Rework ap_dqap to deal with messages greater than recv buffer 2021-07-08 15:37:27 +02:00
net net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by drivers towards the bridge 2021-08-10 13:22:57 -07:00
scsi scsi: zfcp: Report port fc_security as unknown early during remote cable pull 2021-07-12 21:51:50 -04:00
virtio virtio/s390: get rid of open-coded kvm hypercall 2021-06-28 11:18:28 +02:00
Makefile s390: remove pointless drivers-y in drivers/s390/Makefile 2019-09-16 13:21:51 +02:00