summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2011-12-03 03:34:40 +0000
committerkrw <krw@openbsd.org>2011-12-03 03:34:40 +0000
commitecd5c595386f0a97a3ddeb13992fa3226e51ff8d (patch)
treecbfa3a399d73e8b62ff09a1dfbd71c2be5d78953
parentMake sure splx() is called before exiting trm_StartWaitingSRB(). (diff)
downloadwireguard-openbsd-ecd5c595386f0a97a3ddeb13992fa3226e51ff8d.tar.xz
wireguard-openbsd-ecd5c595386f0a97a3ddeb13992fa3226e51ff8d.zip
Make sure splx() is called before exiting wi_usb_tx_lock_try().
Found by Jan Klemkow. Thanks!
-rw-r--r--sys/dev/usb/if_wi_usb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/usb/if_wi_usb.c b/sys/dev/usb/if_wi_usb.c
index 7c8071980ae..7f11acaa788 100644
--- a/sys/dev/usb/if_wi_usb.c
+++ b/sys/dev/usb/if_wi_usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_usb.c,v 1.54 2011/09/18 23:24:12 krw Exp $ */
+/* $OpenBSD: if_wi_usb.c,v 1.55 2011/12/03 03:34:40 krw Exp $ */
/*
* Copyright (c) 2003 Dale Rahn. All rights reserved.
@@ -1885,6 +1885,7 @@ wi_usb_tx_lock_try(struct wi_usb_softc *sc)
DPRINTFN(10,("%s: %s: enter\n", sc->wi_usb_dev.dv_xname, __func__));
if (sc->wi_lock != 0) {
+ splx(s);
return 0; /* failed to aquire lock */
}