Skip to content

Commit

Permalink
wl1271: Remove circular interlocking related to the inetaddr notifier…
Browse files Browse the repository at this point in the history
… chain

Removing the wl1271 from the inet addr notifier chain sometimes causes the
registered handler to be called - causing locking problems if the removing
function is called from within the mutex.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Mar 23, 2010
1 parent a0cb7be commit 2ea9fb3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1029,12 +1029,13 @@ static void wl1271_op_remove_interface(struct ieee80211_hw *hw,
struct wl1271 *wl = hw->priv;
int i;

unregister_inetaddr_notifier(&wl1271_dev_notifier);

mutex_lock(&wl->mutex);
wl1271_debug(DEBUG_MAC80211, "mac80211 remove interface");

wl1271_info("down");

unregister_inetaddr_notifier(&wl1271_dev_notifier);
list_del(&wl->list);

WARN_ON(wl->state != WL1271_STATE_ON);
Expand Down

0 comments on commit 2ea9fb3

Please sign in to comment.