Skip to content

Commit

Permalink
tg3: Fix tg3_skb_error_unmap()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matt Carlson authored and davem330 committed Jun 3, 2011
1 parent ec764bf commit 9a2e0fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -5774,7 +5774,7 @@ static void tg3_skb_error_unmap(struct tg3_napi *tnapi,
dma_unmap_addr(txb, mapping),
skb_headlen(skb),
PCI_DMA_TODEVICE);
for (i = 0; i <= last; i++) {
for (i = 0; i < last; i++) {
skb_frag_t *frag = &skb_shinfo(skb)->frags[i];

entry = NEXT_TX(entry);
Expand Down

0 comments on commit 9a2e0fb

Please sign in to comment.