exynos-linux-stable/drivers/net/wireless/broadcom/brcm80211
Arend Van Spriel 4a70f07da8 brcmfmac: change driver unbind order of the sdio function devices
commit 5c3de777bdaf48bd0cfb43097c0d0fb85056cab7 upstream.

In the function brcmf_sdio_firmware_callback() the driver is
unbound from the sdio function devices in the error path.
However, the order in which it is done resulted in a use-after-free
issue (see brcmf_ops_sdio_remove() in bcmsdh.c). Hence change
the order and first unbind sdio function #2 device and then
unbind sdio function #1 device.

Fixes: 7a51461fc2da ("brcmfmac: unbind all devices upon failure in firmware callback")
Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-14 09:28:13 +01:00
..
brcmfmac brcmfmac: change driver unbind order of the sdio function devices 2017-12-14 09:28:13 +01:00
brcmsmac brcmsmac: make some local variables 'static const' to reduce stack size 2017-10-27 10:38:07 +02:00
brcmutil brcmutil: add field storing control channel to the struct brcmu_chan 2016-06-14 17:27:42 +03:00
include brcmfmac: Add USB ID for Cisco Linksys AE1200 2016-09-03 20:01:03 +03:00
Kconfig
Makefile