2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 08:44:14 +08:00
linux-next/drivers/net/ethernet/mellanox
Amit Cohen 63b08b1f68 mlxsw: spectrum: Protect driver from buggy firmware
When processing port up/down events generated by the device's firmware,
the driver protects itself from events reported for non-existent local
ports, but not the CPU port (local port 0), which exists, but lacks a
netdev.

This can result in a NULL pointer dereference when calling
netif_carrier_{on,off}().

Fix this by bailing early when processing an event reported for the CPU
port. Problem was only observed when running on top of a buggy emulator.

Fixes: 28b1987ef5 ("mlxsw: spectrum: Register CPU port with devlink")
Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-23 11:46:18 +00:00
..
mlx4 net: convert users of bitmap_foo() to linkmode_foo() 2021-10-24 13:58:52 +01:00
mlx5/core net/mlx5: E-Switch, return error if encap isn't supported 2021-11-16 12:20:23 -08:00
mlxbf_gige gpio updates for v5.16 2021-11-08 11:55:21 -08:00
mlxfw devlink: Reduce struct devlink exposure 2021-10-12 16:29:16 -07:00
mlxsw mlxsw: spectrum: Protect driver from buggy firmware 2021-11-23 11:46:18 +00:00
Kconfig Add Mellanox BlueField Gigabit Ethernet driver 2021-06-25 11:20:23 -07:00
Makefile Add Mellanox BlueField Gigabit Ethernet driver 2021-06-25 11:20:23 -07:00