Commit ccde8a45 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by John W. Linville

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: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 09946950
...@@ -4852,6 +4852,9 @@ static void b43_op_stop(struct ieee80211_hw *hw) ...@@ -4852,6 +4852,9 @@ static void b43_op_stop(struct ieee80211_hw *hw)
cancel_work_sync(&(wl->beacon_update_trigger)); cancel_work_sync(&(wl->beacon_update_trigger));
if (!dev)
goto out;
mutex_lock(&wl->mutex); mutex_lock(&wl->mutex);
if (b43_status(dev) >= B43_STAT_STARTED) { if (b43_status(dev) >= B43_STAT_STARTED) {
dev = b43_wireless_core_stop(dev); dev = b43_wireless_core_stop(dev);
...@@ -4863,7 +4866,7 @@ static void b43_op_stop(struct ieee80211_hw *hw) ...@@ -4863,7 +4866,7 @@ static void b43_op_stop(struct ieee80211_hw *hw)
out_unlock: out_unlock:
mutex_unlock(&wl->mutex); mutex_unlock(&wl->mutex);
out:
cancel_work_sync(&(wl->txpower_adjust_work)); cancel_work_sync(&(wl->txpower_adjust_work));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment