Re: [PATCH] staging: rtl8822be: fix wrong dma unmap len

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/23/2017 04:35 AM, Stanislaw Gruszka wrote:
Patch fixes splat:

r8822be 0000:04:00.0: DMA-API: device driver frees DMA memory with different size
[device address=0x0000000078477000] [map size=4096 bytes] [unmap size=424 bytes]
<snip>
Call Trace:
   debug_dma_unmap_page+0xa5/0xb0
   ? unmap_single+0x2f/0x40
   _rtl8822be_send_bcn_or_cmd_packet+0x2c5/0x300 [r8822be]
   ? _rtl8822be_send_bcn_or_cmd_packet+0x2c5/0x300 [r8822be]
   rtl8822b_halmac_cb_write_data_rsvd_page+0x51/0xc0 [r8822be]
   _halmac_write_data_rsvd_page+0x22/0x30 [r8822be]
   halmac_download_rsvd_page_88xx+0xee/0x1f0 [r8822be]
   halmac_dlfw_to_mem_88xx+0x80/0x120 [r8822be]
   halmac_download_firmware_88xx.part.47+0x477/0x600 [r8822be]
   halmac_download_firmware_88xx+0x32/0x40 [r8822be]
   rtl_halmac_dlfw+0x70/0x120 [r8822be]
   rtl_halmac_init_hal+0x5f/0x1b0 [r8822be]
   rtl8822be_hw_init+0x8a2/0x1040 [r8822be]

Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>

Acked-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>

Thanks Stanislaw. It is amazing how long I can stare at a piece of code without seeing the problem.

Larry

---
  drivers/staging/rtlwifi/rtl8822be/fw.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/rtlwifi/rtl8822be/fw.c b/drivers/staging/rtlwifi/rtl8822be/fw.c
index 8e24da1..a2cc548 100644
--- a/drivers/staging/rtlwifi/rtl8822be/fw.c
+++ b/drivers/staging/rtlwifi/rtl8822be/fw.c
@@ -419,7 +419,7 @@ static bool _rtl8822be_send_bcn_or_cmd_packet(struct ieee80211_hw *hw,
  		dma_addr = rtlpriv->cfg->ops->get_desc(
  				hw, (u8 *)pbd_desc, true, HW_DESC_TXBUFF_ADDR);
- pci_unmap_single(rtlpci->pdev, dma_addr, skb->len,
+		pci_unmap_single(rtlpci->pdev, dma_addr, pskb->len,
  				 PCI_DMA_TODEVICE);
  		kfree_skb(pskb);

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux