linux/drivers/net/ethernet/intel/igbvf
Matt Vollrath 0565052b7e igbvf: Fix leak in TX DMA error cleanup
If an error is encountered while mapping TX buffers, the driver should
unmap any buffers already mapped for that skb.

Because count is incremented before each frag mapping, it will always
match the correct number of unmappings needed when dma_error is reached.
Decrementing count before the while loop in dma_error causes an
off-by-one error. If any mapping was successful before an unsuccessful
mapping, exactly one DMA mapping (the head) would leak.

This bug was introduced by a 2010 fix for an endless loop in dma_error.
All other affected drivers have already been fixed.

Fixes: c1fa347f20 ("e1000/e1000e/igb/igbvf/ixgb/ixgbe: Fix tests of unsigned in *_tx_map()")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-4-7-opus
Signed-off-by: Matt Vollrath <tactii@gmail.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2026-07-28 11:23:01 -07:00
..
defines.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
ethtool.c igbvf: remove redundant counter rx_long_byte_count from ethtool statistics 2025-09-03 10:07:27 -07:00
igbvf.h igbvf: remove unused fields from struct igbvf_adapter 2025-07-18 09:02:28 -07:00
Makefile net: intel: Use *-y instead of *-objs in Makefile 2024-06-10 19:52:44 -07:00
mbx.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
mbx.h igbvf: Remove two unused declarations 2024-08-19 17:48:33 -07:00
netdev.c igbvf: Fix leak in TX DMA error cleanup 2026-07-28 11:23:01 -07:00
regs.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
vf.c igbvf: Regard vf reset nack as success 2023-03-16 08:55:56 -07:00
vf.h igbvf: convert to strongly typed descriptors 2021-05-26 09:11:41 -07:00