aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/rfcomm
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-04-03 01:35:23 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-03 01:35:23 -0400
commite1ec1b8ccdf0df6000faa8c2d985ca5f94157e5a (patch)
tree4e1ca325dde22f1ac21c9da0be509e87e922e604 /net/bluetooth/rfcomm
parentc0f39322c335412339dec16ebfd2a05ceba5ebcf (diff)
parent802fb176d8c635ae42da31b80841c26e8c7338a0 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/s2io.c
Diffstat (limited to 'net/bluetooth/rfcomm')
-rw-r--r--net/bluetooth/rfcomm/core.c2
-rw-r--r--net/bluetooth/rfcomm/sock.c2
-rw-r--r--net/bluetooth/rfcomm/tty.c5
3 files changed, 2 insertions, 7 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index 0c2c93735e93..eb62558e9b09 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -423,8 +423,8 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err)
423 423
424 rfcomm_dlc_lock(d); 424 rfcomm_dlc_lock(d);
425 d->state = BT_CLOSED; 425 d->state = BT_CLOSED;
426 d->state_change(d, err);
427 rfcomm_dlc_unlock(d); 426 rfcomm_dlc_unlock(d);
427 d->state_change(d, err);
428 428
429 skb_queue_purge(&d->tx_queue); 429 skb_queue_purge(&d->tx_queue);
430 rfcomm_dlc_unlink(d); 430 rfcomm_dlc_unlink(d);
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index c103fa02893b..5083adcbfae5 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -60,7 +60,7 @@
60static const struct proto_ops rfcomm_sock_ops; 60static const struct proto_ops rfcomm_sock_ops;
61 61
62static struct bt_sock_list rfcomm_sk_list = { 62static struct bt_sock_list rfcomm_sk_list = {
63 .lock = RW_LOCK_UNLOCKED 63 .lock = __RW_LOCK_UNLOCKED(rfcomm_sk_list.lock)
64}; 64};
65 65
66static void rfcomm_sock_close(struct sock *sk); 66static void rfcomm_sock_close(struct sock *sk);
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index e4c779bb8d76..c3f749abb2d0 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -570,12 +570,7 @@ static void rfcomm_dev_state_change(struct rfcomm_dlc *dlc, int err)
570 return; 570 return;
571 571
572 rfcomm_dev_del(dev); 572 rfcomm_dev_del(dev);
573 /* We have to drop DLC lock here, otherwise
574 rfcomm_dev_put() will dead lock if it's
575 the last reference. */
576 rfcomm_dlc_unlock(dlc);
577 rfcomm_dev_put(dev); 573 rfcomm_dev_put(dev);
578 rfcomm_dlc_lock(dlc);
579 } 574 }
580 } else 575 } else
581 tty_hangup(dev->tty); 576 tty_hangup(dev->tty);