提交 9a2e0fb0 编写于 作者: M Matt Carlson 提交者: David S. Miller

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: NMatt Carlson <mcarlson@broadcom.com>
Tested-by: NAlex Williamson <alex.williamson@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ec764bf0
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册