Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ea9fb3d authored by Juuso Oikarinen's avatar Juuso Oikarinen Committed by John W. Linville
Browse files

wl1271: Remove circular interlocking related to the inetaddr notifier 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: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: default avatarTeemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent a0cb7be4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);