Commit 9a2e0fb0893ddf595d0a372e681f5b98017c6d90
Committed by
David S. Miller
1 parent
ec764bf083
Exists in
master
and in
7 other branches
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>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
drivers/net/tg3.c
... | ... | @@ -5774,7 +5774,7 @@ |
5774 | 5774 | dma_unmap_addr(txb, mapping), |
5775 | 5775 | skb_headlen(skb), |
5776 | 5776 | PCI_DMA_TODEVICE); |
5777 | - for (i = 0; i <= last; i++) { | |
5777 | + for (i = 0; i < last; i++) { | |
5778 | 5778 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; |
5779 | 5779 | |
5780 | 5780 | entry = NEXT_TX(entry); |