summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremax <emax@FreeBSD.org>2007-10-31 16:17:20 +0000
committeremax <emax@FreeBSD.org>2007-10-31 16:17:20 +0000
commitff226f6ee0c6e3ffb9fbeed22dca3b09d4dde385 (patch)
tree872ef0c734c6336c4fda40aa049884c538dba643
parent56dbd98cc8f1ab5f0e3a9a6ae613cd9599a4cd68 (diff)
downloadFreeBSD-src-ff226f6ee0c6e3ffb9fbeed22dca3b09d4dde385.zip
FreeBSD-src-ff226f6ee0c6e3ffb9fbeed22dca3b09d4dde385.tar.gz
Fix locking issue in ng_btsocket_l2cap_ctloutput()
Submitted by: Heiko Wundram (Beenic) < wundram at beenic dot net > MFC after: 3 days
-rw-r--r--sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
index 7f21bfe..205ab0e 100644
--- a/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
+++ b/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c
@@ -2228,8 +2228,10 @@ ng_btsocket_l2cap_ctloutput(struct socket *so, struct sockopt *sopt)
* channel?
*/
- if (pcb->state != NG_BTSOCKET_L2CAP_CLOSED)
- return (EACCES);
+ if (pcb->state != NG_BTSOCKET_L2CAP_CLOSED) {
+ error = EACCES;
+ break;
+ }
switch (sopt->sopt_name) {
case SO_L2CAP_IMTU: /* set incoming MTU */
OpenPOWER on IntegriCloud