linux/drivers/net
Arnd Bergmann 188bf40391 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 14:04:32 +01:00
..
appletalk net: appletalk: cops: Fix data race in cops_probe1 2021-06-16 12:01:37 +02:00
arcnet
bonding bonding: Fix a use-after-free problem when bond_sysfs_slave_add() failed 2021-11-18 14:04:26 +01:00
caif net: caif: fix memory leak in ldisc_open 2021-06-30 08:47:21 -04:00
can can: mcp251xfd: mcp251xfd_chip_start(): fix error handling for mcp251xfd_chip_rx_int_enable() 2021-11-18 14:04:26 +01:00
dsa net: dsa: rtl8366rb: Fix off-by-one bug 2021-11-18 14:04:03 +01:00
ethernet cxgb4: fix eeprom len when diagnostics not implemented 2021-11-18 14:04:28 +01:00
fddi net: fddi: fix UAF in fza_probe 2021-07-25 14:36:20 +02:00
fjes fjes: check return value after calling platform_get_resource() 2021-07-19 09:44:49 +02:00
hamradio net: 6pack: Fix tx timeout and slot time 2021-09-30 10:11:07 +02:00
hippi
hyperv
ieee802154 ieee802154: hwsim: fix GPF in hwsim_new_edge_nl 2021-08-18 08:59:07 +02:00
ipa net: ipa: initialize all filter table slots 2021-09-22 12:27:57 +02:00
ipvlan
mdio net: mdio-mux: Handle -EPROBE_DEFER correctly 2021-08-26 08:35:49 -04:00
netdevsim net: netdevsim: use xso.real_dev instead of xso.dev in callback functions of struct xfrmdev_ops 2021-07-25 14:36:19 +02:00
pcs
phy net: phy: fix duplex out of sync problem while changing settings 2021-11-18 14:04:26 +01:00
plip
ppp ppp: Fix generating ifname when empty IFLA_IFNAME is specified 2021-08-18 08:59:10 +02:00
slip
team
usb net: lan78xx: fix division by zero in send path 2021-11-02 19:48:20 +01:00
vmxnet3 vmxnet3: do not stop tx queues after netif_device_detach() 2021-11-18 14:03:43 +01:00
wan
wimax
wireguard wireguard: allowedips: free empty intermediate nodes when removing single node 2021-06-10 13:39:24 +02:00
wireless ath10k: fix invalid dma_addr_t token assignment 2021-11-18 14:04:32 +01:00
xen-netback xen-netback: correct success/error reporting for the SKB-with-fraglist case 2021-10-09 14:40:56 +02:00
bareudp.c bareudp: Fix invalid read beyond skb's linear data 2021-08-18 08:59:11 +02:00
dummy.c
eql.c
geneve.c
gtp.c
ifb.c ifb: fix building without CONFIG_NET_CLS_ACT 2021-11-18 14:03:49 +01:00
Kconfig ifb: Depend on netfilter alternatively to tc 2021-11-18 14:03:46 +01:00
LICENSE.SRC
loopback.c
macsec.c net: macsec: fix the length used to copy the key for offloading 2021-07-14 16:56:28 +02:00
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c
virtio_net.c virtio-net: use NETIF_F_GRO_HW instead of NETIF_F_LRO 2021-08-26 08:35:48 -04:00
vrf.c vrf: run conntrack only in context of lower/physdev for locally generated packets 2021-11-18 14:04:00 +01:00
vsockmon.c
vxlan.c vxlan: add missing rcu_read_lock() in neigh_reduce() 2021-07-14 16:56:25 +02:00
xen-netfront.c xen/netfront: stop tx queues during live migration 2021-11-18 14:03:42 +01:00