Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0cd63c8089f0f6316df1393c3a93bdbc67ab314d
Commit:     0cd63c8089f0f6316df1393c3a93bdbc67ab314d
Parent:     8f789c48448aed74fe1c07af76de8f04adacec7d
Author:     Dave Young <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 18 20:44:01 2008 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Feb 18 20:44:01 2008 -0800

    bluetooth: put hci dev after del conn
    
    Move hci_dev_put to del_conn to avoid hci dev going away before hci conn.
    
    Signed-off-by: Dave Young <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/bluetooth/hci_conn.c  |    1 -
 net/bluetooth/hci_sysfs.c |    3 +++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 5fc7be2..f888026 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -260,7 +260,6 @@ int hci_conn_del(struct hci_conn *conn)
        tasklet_enable(&hdev->tx_task);
        skb_queue_purge(&conn->data_q);
        hci_conn_del_sysfs(conn);
-       hci_dev_put(hdev);
 
        return 0;
 }
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index f5aff6d..767756c 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -334,6 +334,7 @@ static int __match_tty(struct device *dev, void *data)
 static void del_conn(struct work_struct *work)
 {
        struct hci_conn *conn = container_of(work, struct hci_conn, work);
+       struct hci_dev *hdev = conn->hdev;
 
        while (1) {
                struct device *dev;
@@ -344,8 +345,10 @@ static void del_conn(struct work_struct *work)
                device_move(dev, NULL);
                put_device(dev);
        }
+
        device_del(&conn->dev);
        put_device(&conn->dev);
+       hci_dev_put(hdev);
 }
 
 void hci_conn_del_sysfs(struct hci_conn *conn)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to