rtlwifi: Fix IOMMU mapping leak in AP mode
authorLarry Finger <Larry.Finger@lwfinger.net>
Sat, 21 Mar 2015 20:16:05 +0000 (15:16 -0500)
committerSasha Levin <sasha.levin@oracle.com>
Fri, 24 Apr 2015 21:14:02 +0000 (17:14 -0400)
commit19d240f78b05816ce801b1ed65b9aa2582cec95b
treef36de9ec6978ee673ae7d1d4c87bec4ffddd4d25
parentd29425669acc0d163a67fc8a19227599f772d22f
rtlwifi: Fix IOMMU mapping leak in AP mode

[ Upstream commit be0b5e635883678bfbc695889772fed545f3427d ]

Transmission of an AP beacon does not call the TX interrupt service routine,
which usually does the cleanup. Instead, cleanup is handled in a tasklet
completion routine. Unfortunately, this routine has a serious bug in that it does
not release the DMA mapping before it frees the skb, thus one IOMMU mapping is
leaked for each beacon. The test system failed with no free IOMMU mapping slots
approximately one hour after hostapd was used to start an AP.

This issue was reported and tested at https://github.com/lwfinger/rtlwifi_new/issues/30.

Reported-and-tested-by: Kevin Mullican <kevin@mullican.com>
Cc: Kevin Mullican <kevin@mullican.com>
Signed-off-by: Shao Fu <shaofu@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [3.18+]
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/net/wireless/rtlwifi/pci.c