Skip to content

Commit 9a2e0fb

Browse files
Matt Carlsondavem330
authored andcommitted
tg3: Fix tg3_skb_error_unmap()
This function attempts to free one fragment beyond the number of fragments that were actually mapped. This patch brings back the limit to the correct spot. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Tested-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ec764bf commit 9a2e0fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/tg3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5774,7 +5774,7 @@ static void tg3_skb_error_unmap(struct tg3_napi *tnapi,
57745774
dma_unmap_addr(txb, mapping),
57755775
skb_headlen(skb),
57765776
PCI_DMA_TODEVICE);
5777-
for (i = 0; i <= last; i++) {
5777+
for (i = 0; i < last; i++) {
57785778
skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
57795779

57805780
entry = NEXT_TX(entry);

0 commit comments

Comments
 (0)