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>
This commit is contained in:
Родитель
ec764bf083
Коммит
9a2e0fb089
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче