aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_sock.c
diff options
context:
space:
mode:
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 bfc9a35bad33..1dae3dfc66a9 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,
665 /* Detach sockets from device */ 665 /* Detach sockets from device */
666 read_lock(&hci_sk_list.lock); 666 read_lock(&hci_sk_list.lock);
667 sk_for_each(sk, node, &hci_sk_list.head) { 667 sk_for_each(sk, node, &hci_sk_list.head) {
668 lock_sock(sk); 668 local_bh_disable();
669 bh_lock_sock_nested(sk);
669 if (hci_pi(sk)->hdev == hdev) { 670 if (hci_pi(sk)->hdev == hdev) {
670 hci_pi(sk)->hdev = NULL; 671 hci_pi(sk)->hdev = NULL;
671 sk->sk_err = EPIPE; 672 sk->sk_err = EPIPE;
@@ -674,7 +675,8 @@ static int hci_sock_dev_event(struct notifier_block *this, unsigned long event,
674 675
675 hci_dev_put(hdev); 676 hci_dev_put(hdev);
676 } 677 }
677 release_sock(sk); 678 bh_unlock_sock(sk);
679 local_bh_enable();
678 } 680 }
679 read_unlock(&hci_sk_list.lock); 681 read_unlock(&hci_sk_list.lock);
680 } 682 }