mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
Fix up a race condition with the callout_stop method in newstate.
The call should happen with the driver lock held. We don't hold the driver lock in newstate as it's a separate thread where we can't sleep (and we only call wpi_cmd in async mode). Discovered By: Attillo's callout rework Approved By: mlaier (comentor)
This commit is contained in:
parent
a7099588fc
commit
8b92cdc94c
1 changed files with 4 additions and 1 deletions
|
|
@ -16,7 +16,7 @@
|
|||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#define VERSION "20071102"
|
||||
#define VERSION "20071127"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
|
@ -1331,8 +1331,11 @@ wpi_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
|
|||
struct wpi_softc *sc = ifp->if_softc;
|
||||
struct ieee80211_node *ni;
|
||||
int error;
|
||||
WPI_LOCK_DECL;
|
||||
|
||||
WPI_LOCK(sc);
|
||||
callout_stop(&sc->calib_to);
|
||||
WPI_UNLOCK(sc);
|
||||
|
||||
switch (nstate) {
|
||||
case IEEE80211_S_SCAN:
|
||||
|
|
|
|||
Loading…
Reference in a new issue