linux-stable/drivers
Baochen Qiang 46c89472bb wifi: ath12k: check M3 buffer size as well whey trying to reuse it
commit 05090ae82f upstream.

Currently in recovery/resume cases, we do not free M3 buffer but
instead will reuse it. This is done by checking m3_mem->vaddr: if it
is not NULL we believe M3 buffer is ready and go ahead to reuse it.

Note that m3_mem->size is not checked. This is safe for now because
currently M3 reuse logic only gets executed in recovery/resume cases
and the size keeps unchanged in either of them.

However ideally the size should be checked as well, to make the code
safer. So add the check there. Now if that check fails, free old M3
buffer and reallocate a new one.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30

Fixes: 303c017821 ("wifi: ath12k: fix kernel crash during resume")
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240425021740.29221-1-quic_bqiang@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-06-27 13:52:32 +02:00
..
accel
accessibility
acpi ACPI: EC: Evaluate orphan _REG under EC device 2024-06-27 13:52:26 +02:00
amba
android
ata ata: ahci: Do not enable LPM if no LPM states are supported by the HBA 2024-06-27 13:52:29 +02:00
atm
auxdisplay
base
bcma
block nbd: Fix signal handling 2024-06-27 13:52:31 +02:00
bluetooth Bluetooth: ath3k: Fix multiple issues reported by checkpatch.pl 2024-06-27 13:52:15 +02:00
bus
cache
cdrom
cdx
char
clk
clocksource
comedi
connector
counter
cpufreq cpufreq: amd-pstate: fix memory leak on CPU EPP exit 2024-06-27 13:52:19 +02:00
cpuidle
crypto
cxl cxl: Add post-reset warning if reset results in loss of previously committed HDM decoders 2024-06-27 13:52:18 +02:00
dax
dca
devfreq
dio
dma dmaengine: xilinx: xdma: Fix data synchronisation in xdma_channel_isr() 2024-06-27 13:52:29 +02:00
dma-buf
dpll
edac
eisa
extcon
firewire
firmware efi/x86: Free EFI memory map only when installing a new one. 2024-06-27 13:52:30 +02:00
fpga
fsi
gnss
gpio
gpu drm/amd/display: revert Exit idle optimizations before HDCP execution 2024-06-27 13:52:32 +02:00
greybus
hid HID: asus: fix more n-key report descriptors if n-key quirked 2024-06-27 13:52:14 +02:00
hsi
hte
hv
hwmon
hwspinlock
hwtracing
i2c i2c: ocores: set IACK bit after core is enabled 2024-06-27 13:52:30 +02:00
i3c
idle
iio
infiniband RDMA/mlx5: Ensure created mkeys always have a populated rb_key 2024-06-27 13:52:28 +02:00
input
interconnect
iommu iommu/arm-smmu-v3: Free MSIs in case of ENOMEM 2024-06-27 13:52:17 +02:00
ipack
irqchip
isdn
leds
macintosh
mailbox
mcb
md
media media: mtk-vcodec: potential null pointer deference in SCP 2024-06-27 13:52:16 +02:00
memory
memstick
message
mfd
misc
mmc
most
mtd
mux
net wifi: ath12k: check M3 buffer size as well whey trying to reuse it 2024-06-27 13:52:32 +02:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
opp OPP: Fix required_opp_tables for multiple genpds using same table 2024-06-27 13:52:19 +02:00
parisc
parport
pci PCI: Do not wait for disconnected devices when resuming 2024-06-27 13:52:19 +02:00
pcmcia
peci
perf
phy phy: qcom: qmp-combo: Switch from V6 to V6 N4 register offsets 2024-06-27 13:52:23 +02:00
pinctrl
platform platform/x86: p2sb: Don't init until unassigned resources have been assigned 2024-06-27 13:52:16 +02:00
pmdomain OPP: Fix required_opp_tables for multiple genpds using same table 2024-06-27 13:52:19 +02:00
pnp
power power: supply: cros_usbpd: provide ID table for avoiding fallback match 2024-06-27 13:52:16 +02:00
powercap
pps
ps3
ptp ptp: fix integer overflow in max_vclocks_store 2024-06-27 13:52:22 +02:00
pwm
rapidio
ras
regulator regulator: bd71815: fix ramp values 2024-06-27 13:52:24 +02:00
remoteproc
reset
rpmsg
rtc
s390
sbus
scsi scsi: core: Introduce the BLIST_SKIP_IO_HINTS flag 2024-06-27 13:52:29 +02:00
sh
siox
slimbus
soc
soundwire
spi spi: stm32: qspi: Clamp stm32_qspi_get_mode() output to CCR_BUSWIDTH_4 2024-06-27 13:52:31 +02:00
spmi
ssb
staging
target
tc
tee
thermal thermal: core: Change PM notifier priority to the minimum 2024-06-27 13:52:31 +02:00
thunderbolt
tty serial: 8250_dw: Revert "Move definitions to the shared header" 2024-06-27 13:52:30 +02:00
ufs scsi: ufs: core: Free memory allocated for model before reinit 2024-06-27 13:52:27 +02:00
uio
usb scsi: usb: uas: Do not query the IO Advice Hints Grouping mode page for USB/UAS devices 2024-06-27 13:52:29 +02:00
vdpa
vfio vfio/pci: Collect hot-reset devices to local buffer 2024-06-27 13:52:19 +02:00
vhost
video
virt
virtio
w1
watchdog
xen
zorro
Kconfig
Makefile