mirror_ubuntu-kernels/drivers/net/ethernet/microchip/lan966x
Dan Carpenter 9810c58c70 net: lan966x: fix a couple off by one bugs
The lan966x->ports[] array has lan966x->num_phys_ports elements.  These
are assigned in lan966x_probe().  That means the > comparison should be
changed to >=.

The first off by one check is harmless but the second one could lead to
an out of bounds access and a crash.

Fixes: 5ccd66e01c ("net: lan966x: add support for interrupts from analyzer")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-04-25 11:25:37 +01:00
..
Kconfig net: lan966x: Fix when CONFIG_PTP_1588_CLOCK is compiled as module 2022-02-13 15:57:03 +00:00
lan966x_ethtool.c net: lan966x: Implement get_ts_info 2022-02-01 14:18:44 +00:00
lan966x_fdb.c net: lan966x: Extend switchdev with fdb support 2021-12-20 11:44:06 +00:00
lan966x_ifh.h
lan966x_mac.c net: lan966x: fix a couple off by one bugs 2022-04-25 11:25:37 +01:00
lan966x_main.c net: lan966x: Make sure to release ptp interrupt 2022-04-15 14:29:38 -07:00
lan966x_main.h net: lan966x: Add spinlock for frame transmission from CPU. 2022-03-09 14:59:14 +00:00
lan966x_mdb.c net: lan966x: Update mdb when enabling/disabling mcast_snooping 2022-02-05 15:00:43 +00:00
lan966x_phylink.c net: lan966x: use .mac_select_pcs() interface 2022-02-03 19:11:21 -08:00
lan966x_port.c net: lan966x: Fix the configuration of the pcs 2021-12-13 14:39:41 +00:00
lan966x_ptp.c net: lan966x: Update lan966x_ptp_get_nominal_value 2022-04-11 20:47:15 -07:00
lan966x_regs.h net: lan966x: Implement the callback SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED 2022-02-05 15:00:43 +00:00
lan966x_switchdev.c net: lan966x: Fix when a port's upper is changed. 2022-04-11 20:47:15 -07:00
lan966x_vlan.c net: lan966x: Extend switchdev with mdb support 2022-01-05 11:25:13 +00:00
Makefile net: lan966x: Add support for ptp clocks 2022-02-01 14:18:43 +00:00