[lkml]   [2017]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 4.14 070/164] brcmfmac: change driver unbind order of the sdio function devices
4.14-stable review patch.  If anyone has any objections, please let me know.


From: Arend Van Spriel <>

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 <>
Reviewed-by: Hante Meuleman <>
Reviewed-by: Pieter-Paul Giesberts <>
Reviewed-by: Franky Lin <>
Signed-off-by: Arend van Spriel <>
Signed-off-by: Kalle Valo <>
Signed-off-by: Greg Kroah-Hartman <>

drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -4096,8 +4096,8 @@ release:
brcmf_dbg(TRACE, "failed: dev=%s, err=%d\n", dev_name(dev), err);
- device_release_driver(dev);
+ device_release_driver(dev);

struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)

 \ /
  Last update: 2017-12-12 14:50    [W:0.550 / U:2.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site