summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorDavid Hill <dhill@cvs.openbsd.org>2010-05-07 11:16:05 +0000
committerDavid Hill <dhill@cvs.openbsd.org>2010-05-07 11:16:05 +0000
commitdf6345e4898e4044424852df9eb6883ca20963c5 (patch)
tree0a596bc2ae14a7bcca245a541b5fa75242be124b /sys/dev/pci
parent9a05ec9000e42b6d8598803bbc023b788d64066d (diff)
Remember to restore the spl. Found out the hard way by me.
ok @damien
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_iwn.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c
index cc5a31635e1..04dd6e370af 100644
--- a/sys/dev/pci/if_iwn.c
+++ b/sys/dev/pci/if_iwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwn.c,v 1.94 2010/05/05 19:47:43 damien Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.95 2010/05/07 11:16:04 dhill Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -3072,8 +3072,10 @@ iwn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
* Prevent processes from entering this function while another
* process is tsleep'ing in it.
*/
- if (sc->sc_flags & IWN_FLAG_BUSY)
+ if (sc->sc_flags & IWN_FLAG_BUSY) {
+ splx(s);
return EBUSY;
+ }
sc->sc_flags |= IWN_FLAG_BUSY;
switch (cmd) {