OrangePi_CM5/drivers/net/ethernet/netronome/nfp
Christophe JAILLET af4bc921d3 nfp: flower: Fix a potential leak in nfp_tunnel_add_shared_mac()
commit 3a14d0888eb4b0045884126acc69abfb7b87814d upstream.

ida_simple_get() returns an id between min (0) and max (NFP_MAX_MAC_INDEX)
inclusive.
So NFP_MAX_MAC_INDEX (0xff) is a valid id.

In order for the error handling path to work correctly, the 'invalid'
value for 'ida_idx' should not be in the 0..NFP_MAX_MAC_INDEX range,
inclusive.

So set it to -1.

Fixes: 20cce88650 ("nfp: flower: enable MAC address sharing for offloadable devs")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20220218131535.100258-1-simon.horman@corigine.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-02 11:42:50 +01:00
..
abm
…
bpf nfp: bpf: relax prog rejection for mtu check through max_pkt_offset 2021-11-18 14:03:43 +01:00
crypto
…
flower nfp: flower: Fix a potential leak in nfp_tunnel_add_shared_mac() 2022-03-02 11:42:50 +01:00
nfpcore nfp: Fix memory leak in nfp_cpp_area_cache_add() 2021-12-14 11:32:36 +01:00
nic
…
Makefile
…
ccm.c
…
ccm.h
…
ccm_mbox.c
…
devlink_param.c
…
nfp_abi.h
…
nfp_app.c
…
nfp_app.h
…
nfp_app_nic.c
…
nfp_asm.c
…
nfp_asm.h
…
nfp_devlink.c
…
nfp_hwmon.c
…
nfp_main.c
…
nfp_main.h
…
nfp_net.h nfp: checking parameter process for rx-usecs/tx-usecs is invalid 2021-12-01 09:19:04 +01:00
nfp_net_common.c nfp: fix return statement in nfp_net_parse_meta() 2021-09-18 13:40:21 +02:00
nfp_net_ctrl.c
…
nfp_net_ctrl.h
…
nfp_net_debugdump.c
…
nfp_net_debugfs.c
…
nfp_net_ethtool.c nfp: checking parameter process for rx-usecs/tx-usecs is invalid 2021-12-01 09:19:04 +01:00
nfp_net_main.c
…
nfp_net_repr.c
…
nfp_net_repr.h
…
nfp_net_sriov.c
…
nfp_net_sriov.h
…
nfp_netvf_main.c
…
nfp_port.c
…
nfp_port.h
…
nfp_shared_buf.c
…