mirror-linux/drivers/net/ethernet/freescale
Wei Fang 249df695c3 net: enetc: fix the off-by-one issue in enetc_map_tx_tso_buffs()
There is an off-by-one issue for the err_chained_bd path, it will free
one more tx_swbd than expected. But there is no such issue for the
err_map_data path. To fix this off-by-one issue and make the two error
handling consistent, the increment of 'i' and 'count' remain in sync
and enetc_unwind_tx_frame() is called for error handling.

Fixes: fb8629e2cb ("net: enetc: add support for software TSO")
Cc: stable@vger.kernel.org
Suggested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Link: https://patch.msgid.link/20250224111251.1061098-9-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-02-25 19:10:59 -08:00
..
dpaa xdp: get rid of xdp_frame::mem.id 2024-12-12 18:22:52 -08:00
dpaa2 rtnetlink: add ndo_fdb_dump_context 2024-12-10 18:32:32 -08:00
enetc net: enetc: fix the off-by-one issue in enetc_map_tx_tso_buffs() 2025-02-25 19:10:59 -08:00
fman net: phylink: pass neg_mode into c22 state decoder 2025-01-15 13:23:30 -08:00
fs_enet net: ethernet: fs_enet: Use %pa to format resource_size_t 2024-10-15 10:55:54 -07:00
Kconfig net: freescale: ucc_geth: phylink conversion 2024-12-06 13:41:53 +00:00
Makefile
fec.h net: fec: use phydev->eee_cfg.tx_lpi_timer 2024-12-11 20:23:52 -08:00
fec_main.c net: fec: implement TSO descriptor cleanup 2025-01-23 10:14:34 +01:00
fec_mpc52xx.c net: ethernet: Switch back to struct platform_driver::remove() 2024-10-04 16:39:56 -07:00
fec_mpc52xx.h
fec_mpc52xx_phy.c net: fec_mpc52xx_phy: Use %pa to format resource_size_t 2024-10-15 10:55:54 -07:00
fec_ptp.c net: fec: make PPS channel configurable 2024-10-08 12:29:34 +02:00
fsl_pq_mdio.c net: ethernet: Switch back to struct platform_driver::remove() 2024-10-04 16:39:56 -07:00
gianfar.c net: gianfar: Use __be64 * to store pointers to big endian values 2024-10-15 13:59:26 +02:00
gianfar.h
gianfar_ethtool.c net: freescale: use ethtool string helpers 2024-10-31 18:34:48 -07:00
ucc_geth.c net: watchdog: rename __dev_watchdog_up() and dev_watchdog_down() 2025-01-07 17:43:01 -08:00
ucc_geth.h net: freescale: ucc_geth: phylink conversion 2024-12-06 13:41:53 +00:00
ucc_geth_ethtool.c net: freescale: ucc_geth: phylink conversion 2024-12-06 13:41:53 +00:00
xgmac_mdio.c net: Explicitly include correct DT includes 2023-07-27 20:33:16 -07:00