#570: kernel bug soft lockup in station mode when switching APs
----------------------------------------+-----------------------------------
Reporter: [EMAIL PROTECTED] | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: madwifi: other | Version: trunk
Resolution: | Keywords:
Patch_attached: 1 |
----------------------------------------+-----------------------------------
Comment (by [EMAIL PROTECTED]):
Yeppers, deadlock.2.patch is the correct one.
Just for posterity, I'll describe what was happening:
ieee80211_new_state was called both from tasklets and from user-context,
and was using spin_lock. The following sequence of events would crash the
machine:
user-context: ieee80211_ioctl_set<anything> -> ieee80211_new_state
user-context: locks the spin lock
tasklet: preempts user-context
tasklet: ieee80211_input -> ieee80211_recv_mgmt -> ieee80211_new_state
tasklet: tries to lock the spin lock
That would deadlock, since the tasklet was blocked on the spinlock, and
user-context was blocked waiting for the tasklet to finish.
There was some discussion on madwifi-devel about what the appropriate
locking in that function really was. We established that hardirqs never
called ieee80211_new_state, so it was sufficient to use spin_lock_bh to
disable tasklets while user-context held that lock.
Switching the card configuration after associating with an AP was likely
to trigger the bug, because ieee80211_recv_mgmt was only called if you had
associated with the AP already.
--
Ticket URL: <http://madwifi.org/ticket/570>
MadWifi <http://madwifi.org/>
Multiband Atheros Driver for Wireless Fidelity