android_kernel_xiaomi_sm8350/core
gaurank kathpalia b4539e1cf1 qcacld-3.0: Check vdev state before ACS cb
Currently the driver calls the pre bss scan cb
which is used to calculate the weight to start
the SAP on best channel. This API depends upon
the SAP context pointer which is passed as a arg
to the scan module, which in turn returns the arg
as part of the scan cb. But it may happen that
the SAP was deleted before the scan cb was called.
In that case pre bss scan cb and weight calculation
does not matter to the driver as SAP in any case is
OFF. Here the sap context which was passed as an arg
to the ACS cb is used after free, and there is no way
currently to validate the pointer. But as part of scan
cb, the driver gets a vdev pointer, which would be in a
logically deleted state, if the stop adapter for SAP has
been done. Using this data, the driver can know the object
status, and then decide to continue with the weight calculation.

Fix is to try get vdev ref before the weight calculation algo
kicks in, and return if the reference cannot be taken to avoid
use after free for SAP-context.

Change-Id: Ib9c3bde4a36ee49efdadab3dc531991b8688f79e
CRs-Fixed: 2509249
2019-08-15 12:28:34 -07:00
..
bmi qcacld-3.0: Send user space about FW CRASHED indication 2019-07-05 23:07:30 -07:00
cds qcacld-3.0: Don't call pld_collect_rddm in trigger recovery handler 2019-08-10 04:05:01 -07:00
dp qcacld-3.0: Use different wait queues for threads 2019-08-13 20:25:57 -07:00
hdd qcacld-3.0: Follow concurrent SAP switch channel in the same band 2019-08-15 01:03:16 -07:00
mac Release 5.2.0.144E 2019-08-15 01:03:16 -07:00
pld qcacld-3.0: Add sdio support for pld_wlan_enable 2019-08-08 11:37:51 -07:00
sap qcacld-3.0: Check vdev state before ACS cb 2019-08-15 12:28:34 -07:00
sme qcacld-3.0: Rename WLAN_SER_CMD_DEL_STA_SESSION macro 2019-08-14 15:43:08 -07:00
wma qcacld-3.0: Add vdev start, stop, and set-key wakelock for runtime PM 2019-08-14 17:01:55 -07:00