aboutsummaryrefslogtreecommitdiff
path: root/net/bluetooth/hci_sock.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-18 08:25:14 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-18 08:25:14 -0700
commitbfea13d4a127aab4c10085b6f9b6e2ff4f023f79 (patch)
tree4195848eb43a12409511cea39903c3e4c6249281 /net/bluetooth/hci_sock.c
parent32f9306b161a5e0c892132f7227f36de94090289 (diff)
parentf6c5d736af6bc71cebc017e4001ec5efff1ee116 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [IPV4]: Remove IPVS icmp hack from route.c for now. [IPV4]: Correct rp_filter help text. [TCP]: TCP_CONG_YEAH requires TCP_CONG_VEGAS [TCP] slow start: Make comments and code logic clearer. [BLUETOOTH]: Fix locking in hci_sock_dev_event(). [NET]: Fix BMSR_100{HALF,FULL}2 defines in linux/mii.h [NET]: lockdep classes in register_netdevice
Diffstat (limited to 'net/bluetooth/hci_sock.c')
-rw-r--r--net/bluetooth/hci_sock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index bfc9a35bad3..1dae3dfc66a 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -665,7 +665,8 @@ static int hci_sock_dev_event(struct notifier_block *this, unsigned long event,
/* Detach sockets from device */
read_lock(&hci_sk_list.lock);
sk_for_each(sk, node, &hci_sk_list.head) {
- lock_sock(sk);
+ local_bh_disable();
+ bh_lock_sock_nested(sk);
if (hci_pi(sk)->hdev == hdev) {
hci_pi(sk)->hdev = NULL;
sk->sk_err = EPIPE;
@@ -674,7 +675,8 @@ static int hci_sock_dev_event(struct notifier_block *this, unsigned long event,
hci_dev_put(hdev);
}
- release_sock(sk);
+ bh_unlock_sock(sk);
+ local_bh_enable();
}
read_unlock(&hci_sk_list.lock);
}