]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
brcmfmac: Fix kernel oops in failed chip_attach
authorChristian Daudt <csd@broadcom.com>
Wed, 11 May 2016 22:06:48 +0000 (15:06 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Sat, 4 Jun 2016 14:58:52 +0000 (17:58 +0300)
commitb88a2e80396ba463a4800c62c96e86954cb0f4f7
treec5be681c59487929db0971ce43effd775df41d22
parent83e41e77819b642a084f5e9e54ba4ad5d4e17466
brcmfmac: Fix kernel oops in failed chip_attach

When chip attach fails, brcmf_sdiod_intr_unregister is being called
but that is too early as sdiodev->settings has not been set yet
nor has brcmf_sdiod_intr_register been called.
Change to use oob_irq_requested + newly created sd_irq_requested
to decide on what to unregister at intr_unregister time.

Steps to reproduce problem:
- modprobe brcmfmac using buggy FW
- rmmod brcmfmac
- modprobe brcmfmac again.

If done with a buggy firmware, brcm_chip_attach will fail on the
2nd modprobe triggering the call to intr_unregister and the
kernel oops when attempting to de-reference sdiodev->settings->bus.sdio
which has not yet been set.

Signed-off-by: Christian Daudt <csd@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.h