0084-net-next-mediatek-invalid-buffer-lookup-in-mtk_tx_ma.patch 940 B

123456789101112131415161718192021222324252627
  1. From 1eea1536dbbbfda418751ec6f5387acb521ddb97 Mon Sep 17 00:00:00 2001
  2. From: John Crispin <john@phrozen.org>
  3. Date: Sat, 23 Apr 2016 09:25:00 +0200
  4. Subject: [PATCH 084/102] net-next: mediatek: invalid buffer lookup in
  5. mtk_tx_map()
  6. The lookup of the tx_buffer in the error path inside mtk_tx_map() uses the
  7. wrong descriptor pointer. This looks like a copy & paste error. Change the
  8. code to use the correct pointer.
  9. Signed-off-by: Sean Wang <keyhaede@gmail.com>
  10. Signed-off-by: John Crispin <john@phrozen.org>
  11. ---
  12. drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +-
  13. 1 file changed, 1 insertion(+), 1 deletion(-)
  14. --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
  15. +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
  16. @@ -686,7 +686,7 @@ static int mtk_tx_map(struct sk_buff *sk
  17. err_dma:
  18. do {
  19. - tx_buf = mtk_desc_to_tx_buf(ring, txd);
  20. + tx_buf = mtk_desc_to_tx_buf(ring, itxd);
  21. /* unmap dma */
  22. mtk_tx_unmap(&dev->dev, tx_buf);