Skip to content

Commit

Permalink
8139cp: Use dev_kfree_skb_any() instead of dev_kfree_skb() in cp_clea…
Browse files Browse the repository at this point in the history
…n_rings()

This can be called from cp_tx_timeout() with interrupts disabled.
Spotted by Francois Romieu <[email protected]>

Signed-off-by: David Woodhouse <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
dwmw2 authored and davem330 committed Sep 21, 2015
1 parent 0315e38 commit fc27bd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/realtek/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ static void cp_clean_rings (struct cp_private *cp)
desc = cp->rx_ring + i;
dma_unmap_single(&cp->pdev->dev,le64_to_cpu(desc->addr),
cp->rx_buf_sz, PCI_DMA_FROMDEVICE);
dev_kfree_skb(cp->rx_skb[i]);
dev_kfree_skb_any(cp->rx_skb[i]);
}
}

Expand All @@ -1164,7 +1164,7 @@ static void cp_clean_rings (struct cp_private *cp)
le32_to_cpu(desc->opts1) & 0xffff,
PCI_DMA_TODEVICE);
if (le32_to_cpu(desc->opts1) & LastFrag)
dev_kfree_skb(skb);
dev_kfree_skb_any(skb);
cp->dev->stats.tx_dropped++;
}
}
Expand Down

0 comments on commit fc27bd1

Please sign in to comment.