Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wireless: b43: fix Oops on card eject during transfer

An Oops has once been observed, when the SDIO card had been ejected during
IO. The PC value shows, that the dev pointer in b43_op_stop() was NULL.

(I moved the NULL check before the lock, based upon a suggestion from
Julian Calaby <julian.calaby@gmail.com>. -- JWL)

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Guennadi Liakhovetski and committed by
John W. Linville
ccde8a45 09946950

+4 -1
+4 -1
drivers/net/wireless/b43/main.c
··· 4852 4852 4853 4853 cancel_work_sync(&(wl->beacon_update_trigger)); 4854 4854 4855 + if (!dev) 4856 + goto out; 4857 + 4855 4858 mutex_lock(&wl->mutex); 4856 4859 if (b43_status(dev) >= B43_STAT_STARTED) { 4857 4860 dev = b43_wireless_core_stop(dev); ··· 4866 4863 4867 4864 out_unlock: 4868 4865 mutex_unlock(&wl->mutex); 4869 - 4866 + out: 4870 4867 cancel_work_sync(&(wl->txpower_adjust_work)); 4871 4868 } 4872 4869