summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2004-11-17 12:30:12 +0100
committerMarcel Holtmann <linux-mh.adm@bkbits.net>2004-11-17 12:30:12 +0100
commit09f68b67f9dfccc1db8fcdc3275dc474fecdb40b (patch)
treed033a89c66a75bbc47eb72bdcc85cd933d80986b
parent05d108bb91084242195f1f5eed520e2dad9e9a80 (diff)
[Bluetooth] Correct locking for zero SCID responses
The l2cap_get_chan_by_ident() function must lock the socket with the bh_lock_sock() function on success. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--net/bluetooth/l2cap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 478ea919ce87..e79d0eefdb6d 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -964,6 +964,7 @@ static inline struct sock *l2cap_get_chan_by_ident(struct l2cap_chan_list *l, u8
struct sock *s;
read_lock(&l->lock);
s = __l2cap_get_chan_by_ident(l, ident);
+ if (s) bh_lock_sock(s);
read_unlock(&l->lock);
return s;
}