linux-stable/drivers/net/ethernet/mellanox/mlxsw
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
..
cmd.h
core.c devlink: Delete reload enable/disable interface 2021-10-12 16:29:17 -07:00
core.h mlxsw: core: Remove mlxsw_core_is_initialized() 2021-09-15 16:17:15 +01:00
core_acl_flex_actions.c
core_acl_flex_actions.h
core_acl_flex_keys.c
core_acl_flex_keys.h
core_env.c mlxsw: Add ability to control transceiver modules' power mode 2021-10-06 17:47:49 -07:00
core_env.h mlxsw: Add ability to control transceiver modules' power mode 2021-10-06 17:47:49 -07:00
core_hwmon.c mlxsw: reg: Extend MTMP register with new threshold field 2021-06-08 14:39:07 -07:00
core_thermal.c mlxsw: thermal: Fix out-of-bounds memory accesses 2021-10-14 07:13:26 -07:00
emad.h
i2c.c
i2c.h
item.h mlxsw: item: Annotate item helpers with '__maybe_unused' 2021-10-08 16:59:33 -07:00
Kconfig ethernet: fix PTP_1588_CLOCK dependencies 2021-08-13 17:49:05 -07:00
Makefile mlxsw: Remove Mellanox SwitchX-2 ASIC support 2021-05-17 15:15:46 -07:00
minimal.c ethernet: mlxsw: use eth_hw_addr_gen() 2021-10-19 12:46:25 +01:00
pci.c pci-v5.16-changes 2021-11-06 14:36:12 -07:00
pci.h mlxsw: Remove Mellanox SwitchX-2 ASIC support 2021-05-17 15:15:46 -07:00
pci_hw.h
port.h
reg.h mlxsw: reg: Add MAC profile ID field to RITR register 2021-10-26 13:35:56 +01:00
resources.h mlxsw: resources: Add resource identifier for RIF MAC profiles 2021-10-26 13:35:56 +01:00
spectrum.c mlxsw: spectrum: Protect driver from buggy firmware 2021-11-23 11:46:18 +00:00
spectrum.h mlxsw: spectrum_router: Expose RIF MAC profiles to devlink resource 2021-10-26 13:35:57 +01:00
spectrum1_acl_tcam.c
spectrum1_kvdl.c
spectrum1_mr_tcam.c
spectrum2_acl_tcam.c
spectrum2_kvdl.c mlxsw: Add IPV6_ADDRESS kvdl entry type 2021-09-24 10:26:52 +01:00
spectrum2_mr_tcam.c
spectrum_acl.c mlxsw: spectrum_acl: Offload FLOW_ACTION_SAMPLE 2021-03-16 15:32:22 -07:00
spectrum_acl_atcam.c mlxsw: spectrum: Use 'bitmap_zalloc()' when applicable 2021-10-25 15:42:24 +01:00
spectrum_acl_bloom_filter.c
spectrum_acl_ctcam.c
spectrum_acl_erp.c
spectrum_acl_flex_actions.c mlxsw: spectrum_acl: Offload FLOW_ACTION_SAMPLE 2021-03-16 15:32:22 -07:00
spectrum_acl_flex_actions.h
spectrum_acl_flex_keys.c
spectrum_acl_tcam.c mlxsw: spectrum: Use 'bitmap_zalloc()' when applicable 2021-10-25 15:42:24 +01:00
spectrum_acl_tcam.h
spectrum_buffers.c mlxsw: spectrum_buffers: silence uninitialized warning 2021-10-06 15:23:02 +01:00
spectrum_cnt.c mlxsw: spectrum: Use 'bitmap_zalloc()' when applicable 2021-10-25 15:42:24 +01:00
spectrum_cnt.h
spectrum_dcb.c
spectrum_dpipe.c mlxsw: spectrum_router: Pass payload pointer to nexthop update function 2021-03-24 16:34:57 -07:00
spectrum_dpipe.h
spectrum_ethtool.c mlxsw: Add support for transceiver module extended state 2021-10-06 17:47:50 -07:00
spectrum_fid.c
spectrum_flow.c
spectrum_flower.c mlxsw: spectrum_acl: Offload FLOW_ACTION_SAMPLE 2021-03-16 15:32:22 -07:00
spectrum_ipip.c mlxsw: Add support for IP-in-IP with IPv6 underlay for Spectrum-2 and above 2021-09-24 10:26:52 +01:00
spectrum_ipip.h mlxsw: Add support for IP-in-IP with IPv6 underlay for Spectrum-2 and above 2021-09-24 10:26:52 +01:00
spectrum_kvdl.c
spectrum_matchall.c mlxsw: spectrum_matchall: Perform priority checks earlier 2021-03-29 13:37:25 -07:00
spectrum_mr.c mlxsw: spectrum_mr: Update egress RIF list before route's action 2021-05-06 17:19:29 -07:00
spectrum_mr.h
spectrum_mr_tcam.c
spectrum_mr_tcam.h
spectrum_nve.c mlxsw: spectrum: Fix ECN marking in tunnel decapsulation 2021-03-29 13:29:49 -07:00
spectrum_nve.h mlxsw: Remove old parsing depth infrastructure 2021-08-22 21:39:55 +01:00
spectrum_nve_vxlan.c mlxsw: Remove old parsing depth infrastructure 2021-08-22 21:39:55 +01:00
spectrum_policer.c
spectrum_ptp.c mlxsw: Convert existing consumers to use new API for parsing configuration 2021-08-22 21:39:55 +01:00
spectrum_ptp.h
spectrum_qdisc.c mlxsw: spectrum_qdisc: Offload root TBF as port shaper 2021-10-28 19:47:49 -07:00
spectrum_router.c mlxsw: spectrum_router: Expose RIF MAC profiles to devlink resource 2021-10-26 13:35:57 +01:00
spectrum_router.h mlxsw: spectrum_router: Add RIF MAC profiles support 2021-10-26 13:35:57 +01:00
spectrum_router_xm.c
spectrum_span.c mlxsw: spectrum_qdisc: Distinguish between ingress and egress triggers 2021-10-12 11:19:35 +01:00
spectrum_span.h mlxsw: spectrum_qdisc: Distinguish between ingress and egress triggers 2021-10-12 11:19:35 +01:00
spectrum_switchdev.c mlxsw: spectrum: Use 'bitmap_zalloc()' when applicable 2021-10-25 15:42:24 +01:00
spectrum_switchdev.h
spectrum_trap.c mlxsw: spectrum_acl: Offload FLOW_ACTION_SAMPLE 2021-03-16 15:32:22 -07:00
spectrum_trap.h
trap.h
txheader.h