mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Fix a race condition in owi. If you eject a card, then the wi_inquire
timeout would continue to happen: boom! Fix this[*] by timing out earlier. [*] almost fixes the race on unload: wi_inquire could be running when untimeout is called, and there's no way to know when it has actually returned. This race is very rare and hard to lose. Submitted by: scottl
This commit is contained in:
parent
4d721ca3ae
commit
11a3320287
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=121079
@ -1901,6 +1901,8 @@ owi_stop(sc)
|
||||
|
||||
WI_LOCK(sc, s);
|
||||
|
||||
untimeout(wi_inquire, sc, sc->wi_stat_ch);
|
||||
|
||||
if (sc->wi_gone) {
|
||||
WI_UNLOCK(sc, s);
|
||||
return;
|
||||
@ -1918,8 +1920,6 @@ owi_stop(sc)
|
||||
wi_cmd(sc, WI_CMD_DISABLE|sc->wi_portnum, 0, 0, 0);
|
||||
}
|
||||
|
||||
untimeout(wi_inquire, sc, sc->wi_stat_ch);
|
||||
|
||||
ifp->if_flags &= ~(IFF_RUNNING|IFF_OACTIVE);
|
||||
|
||||
WI_UNLOCK(sc, s);
|
||||
|
Loading…
Reference in New Issue
Block a user