linux/drivers/net/wireless
Arnd Bergmann 6f11f2096b ath10k: fix invalid dma_addr_t token assignment
commit 937e79c677 upstream.

Using a kernel pointer in place of a dma_addr_t token can
lead to undefined behavior if that makes it into cache
management functions. The compiler caught one such attempt
in a cast:

drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_add_interface':
drivers/net/wireless/ath/ath10k/mac.c:5586:47: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
 5586 |                         arvif->beacon_paddr = (dma_addr_t)arvif->beacon_buf;
      |                                               ^

Looking through how this gets used down the way, I'm fairly
sure that beacon_paddr is never accessed again for ATH10K_DEV_TYPE_HL
devices, and if it was accessed, that would be a bug.

Change the assignment to use a known-invalid address token
instead, which avoids the warning and makes it easier to catch
bugs if it does end up getting used.

Fixes: e263bdab9c ("ath10k: high latency fixes for beacon buffer")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211014075153.3655910-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-11-18 19:17:20 +01:00
..
admtek
ath ath10k: fix invalid dma_addr_t token assignment 2021-11-18 19:17:20 +01:00
atmel
broadcom b43: fix a lower bounds test 2021-11-18 19:16:31 +01:00
cisco
intel iwlwifi: pnvm: read EFI data only if long enough 2021-11-18 19:16:38 +01:00
intersil Kbuild updates for v5.15 2021-09-03 15:33:47 -07:00
marvell libertas: Fix possible memory leak in probe and disconnect 2021-11-18 19:16:42 +01:00
mediatek mt76: mt7615: mt7622: fix ibss and meshpoint 2021-11-18 19:16:40 +01:00
microchip wilc1000: fix possible memory leak in cfg_scan_result() 2021-11-18 19:16:24 +01:00
quantenna
ralink
realtek rtw88: fix RX clock gate setting while fifo dump 2021-11-18 19:16:13 +01:00
rsi rsi: stop thread firstly in rsi_91x_init() error handling 2021-11-18 19:16:38 +01:00
st
ti
zydas
Kconfig
mac80211_hwsim.c mac80211-hwsim: fix late beacon hrtimer handling 2021-09-23 13:25:12 +02:00
mac80211_hwsim.h
Makefile
ray_cs.c
ray_cs.h
rayctl.h
rndis_wlan.c
virt_wifi.c
wl3501_cs.c
wl3501.h