OpenCloudOS-Kernel/drivers/net/ethernet/mellanox/mlxsw
Amit Cohen ed43cff065 mlxsw: spectrum_router: Fix use of uninitialized adjacency index
When mlxsw_sp_adj_discard_write() is called for the first time, the
value stored in 'mlxsw_sp->router->adj_discard_index' is invalid, as
indicated by 'mlxsw_sp->router->adj_discard_index_valid' being set to
'false'.

In this case, we should not use the value initially stored in
'mlxsw_sp->router->adj_discard_index' (0) and instead use the value
allocated later in the function.

Fixes: 983db6198f ("mlxsw: spectrum_router: Allocate discard adjacency entry when needed")
Signed-off-by: Amit Cohen <amitc@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
2019-11-24 18:34:46 -08:00
..
Kconfig mlxsw: spectrum: Extend to support Spectrum-3 ASIC 2019-08-08 22:27:09 -07:00
Makefile mlxsw: spectrum: Add devlink-trap support 2019-08-21 12:58:39 -07:00
cmd.h mlxsw: cmd: Free running clock PCI BAR and offsets via query firmware 2019-06-13 22:34:55 -07:00
core.c mlxsw: core: Add support for using EMAD string TLV 2019-11-12 10:54:02 -08:00
core.h mlxsw: core: Add support for using EMAD string TLV 2019-11-12 10:54:02 -08:00
core_acl_flex_actions.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
core_acl_flex_actions.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
core_acl_flex_keys.c mlxsw: spectrum_acl: Avoid size check for RX_ACL_SYSTEM_PORT element 2019-06-19 10:09:22 -04:00
core_acl_flex_keys.h mlxsw: spectrum_acl: Fix SRC_SYS_PORT element size 2019-06-19 10:09:22 -04:00
core_env.c mlxsw: core: Extend QSFP EEPROM size for ethtool 2019-10-22 10:30:41 -07:00
core_env.h mlxsw: core: Move ethtool module callbacks to a common location 2019-03-03 22:23:00 -08:00
core_hwmon.c mlxsw: hwmon: Provide optimization for QSFP modules number detection 2019-10-06 18:31:39 +02:00
core_thermal.c mlxsw: thermal: Provide optimization for QSFP modules number detection 2019-10-06 18:31:39 +02:00
emad.h mlxsw: core: Add EMAD string TLV 2019-11-12 10:54:02 -08:00
i2c.c mlxsw: Propagate extack down to register_fib_notifier() 2019-10-04 11:10:56 -07:00
i2c.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
ib.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
item.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
minimal.c mlxsw: minimal: Add validation for FW version 2019-10-06 18:31:39 +02:00
pci.c mlxsw: Propagate extack down to register_fib_notifier() 2019-10-04 11:10:56 -07:00
pci.h mlxsw: spectrum: Extend to support Spectrum-3 ASIC 2019-08-08 22:27:09 -07:00
pci_hw.h mlxsw: pci: Increase PCI reset timeout for SN3800 systems 2019-10-30 12:07:05 -07:00
port.h mlxsw: spectrum: Use PMTM register to get max module width 2019-10-31 10:54:46 -07:00
reg.h mlxsw: Add layer 3 devlink-trap support 2019-11-07 19:51:40 -08:00
resources.h mlxsw: spectrum: Introduce resource for getting offset of 4 lanes split port 2019-10-31 10:54:47 -07:00
spectrum.c mlxsw: spectrum: Enable EMAD string TLV 2019-11-12 10:54:02 -08:00
spectrum.h mlxsw: spectrum: Use port_module_max_width to compute base port index 2019-10-31 10:54:47 -07:00
spectrum1_acl_tcam.c mlxsw: spectrum_acl: Pass hints priv all the way to ERP code 2019-02-08 15:02:50 -08:00
spectrum1_kvdl.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum1_mr_tcam.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum2_acl_tcam.c mlxsw: spectrum_acl: Pass hints priv all the way to ERP code 2019-02-08 15:02:50 -08:00
spectrum2_kvdl.c mlxsw: spectrum: Add a new type of KVD linear record 2018-10-11 10:08:22 -07:00
spectrum2_mr_tcam.c mlxsw: spectrum_router: Add Multicast routing support for Spectrum-2 2018-12-11 23:01:33 -08:00
spectrum_acl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-08-19 11:54:03 -07:00
spectrum_acl_atcam.c mlxsw: spectrum_acl: Pass hints priv all the way to ERP code 2019-02-08 15:02:50 -08:00
spectrum_acl_bloom_filter.c mlxsw: spectrum_acl: Introduce mutex to guard Bloom Filter updates 2019-02-24 20:25:29 -08:00
spectrum_acl_ctcam.c mlxsw: spectrum_acl: Remove unnecessary arg on action_replace call path 2019-01-28 10:43:15 -08:00
spectrum_acl_erp.c mlxsw: spectrum_acl: Avoid warning after identical rules insertion 2019-05-30 12:30:47 -07:00
spectrum_acl_flex_actions.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_acl_flex_actions.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_acl_flex_keys.c mlxsw: spectrum_acl: Fix SRC_SYS_PORT element size 2019-06-19 10:09:22 -04:00
spectrum_acl_tcam.c mlxsw: spectrum_acl: Rename rehash_dis trace 2019-03-31 11:01:23 -07:00
spectrum_acl_tcam.h mlxsw: spectrum_acl: Don't take rtnl lock during vregion_rehash_intrvl_set() 2019-02-24 20:25:29 -08:00
spectrum_buffers.c mlxsw: Fix 64-bit division in mlxsw_sp_sb_prs_init 2019-10-31 13:55:34 -07:00
spectrum_cnt.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_cnt.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_dcb.c mlxsw: spectrum_dcb: Configure DSCP map as the last rule is removed 2019-07-17 15:19:46 -07:00
spectrum_dpipe.c mlxsw: spectrum_router: Support RIF without device 2019-01-20 11:12:57 -08:00
spectrum_dpipe.h mlxsw: spectrum: Assume CONFIG_NET_DEVLINK is always enabled 2019-04-19 15:03:55 -07:00
spectrum_fid.c mlxsw: spectrum: Do not process learned records with a dummy FID 2019-07-17 15:19:46 -07:00
spectrum_flower.c mlxsw: spectrum_flower: Fail in case user specifies multiple mirror actions 2019-09-27 20:33:19 +02:00
spectrum_ipip.c mlxsw: spectrum_router: Update tunnel decap properties 2019-01-20 11:12:58 -08:00
spectrum_ipip.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_kvdl.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_mr.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_mr.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_mr_tcam.c mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_mr_tcam.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_nve.c mlxsw: spectrum: Take devlink net instead of init_net 2019-10-04 11:10:56 -07:00
spectrum_nve.h mlxsw: spectrum_ptp: Increase parsing depth when PTP is enabled 2019-07-29 13:55:05 -07:00
spectrum_nve_vxlan.c mlxsw: spectrum_ptp: Increase parsing depth when PTP is enabled 2019-07-29 13:55:05 -07:00
spectrum_ptp.c mlxsw: spectrum_ptp: Add counters for GC events 2019-08-28 18:24:04 -07:00
spectrum_ptp.h mlxsw: spectrum_ptp: Add counters for GC events 2019-08-28 18:24:04 -07:00
spectrum_qdisc.c mlxsw: spectrum: Use guaranteed buffer size as pool size limit 2019-10-23 21:31:31 -07:00
spectrum_router.c mlxsw: spectrum_router: Fix use of uninitialized adjacency index 2019-11-24 18:34:46 -08:00
spectrum_router.h mlxsw: spectrum_router: Update tunnel decap properties 2019-01-20 11:12:58 -08:00
spectrum_span.c mlxsw: spectrum: Register switched port analyzers (SPAN) as resource 2019-10-18 10:05:37 -07:00
spectrum_span.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_switchdev.c mlxsw: spectrum: Take devlink net instead of init_net 2019-10-04 11:10:56 -07:00
spectrum_switchdev.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00
spectrum_trap.c mlxsw: Add layer 3 devlink-trap exceptions support 2019-11-07 19:51:40 -08:00
switchib.c mlxsw: Propagate extack down to register_fib_notifier() 2019-10-04 11:10:56 -07:00
switchx2.c mlxsw: Propagate extack down to register_fib_notifier() 2019-10-04 11:10:56 -07:00
trap.h mlxsw: Add layer 3 devlink-trap exceptions support 2019-11-07 19:51:40 -08:00
txheader.h mlxsw: Replace license text with SPDX identifiers and adjust copyrights 2018-08-09 10:36:10 -07:00