Re: [PATCH 1/2] bluetooth : put hci dev after del conn

2008-02-19 Thread Dave Young
On Feb 19, 2008 12:44 PM, David Miller [EMAIL PROTECTED] wrote:
 From: Dave Young [EMAIL PROTECTED]
 Date: Mon, 18 Feb 2008 15:55:55 +0800

  Move hci_dev_put to del_conn to avoid hci dev going away before hci conn.

 This looks correct so I have applied it.

  Signed-off-by: Dave Young [EMAIL PROTECTED]

 Please remove the extraneous space at the end of your
 signoff line next time :-)

Will do :)


 Also, I reworked the loop in del_conn() so that it no longer
 generates a compile warning, so I had to apply your patch
 by hand.


Thanks a lot.

Regards
dave
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] bluetooth : put hci dev after del conn

2008-02-18 Thread David Miller
From: Dave Young [EMAIL PROTECTED]
Date: Mon, 18 Feb 2008 15:55:55 +0800

 Move hci_dev_put to del_conn to avoid hci dev going away before hci conn.

This looks correct so I have applied it.

 Signed-off-by: Dave Young [EMAIL PROTECTED] 

Please remove the extraneous space at the end of your
signoff line next time :-)

Also, I reworked the loop in del_conn() so that it no longer
generates a compile warning, so I had to apply your patch
by hand.
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] bluetooth : put hci dev after del conn

2008-02-17 Thread Dave Young
Move hci_dev_put to del_conn to avoid hci dev going away before hci conn.

Signed-off-by: Dave Young [EMAIL PROTECTED] 

---
net/bluetooth/hci_conn.c  |1 -
net/bluetooth/hci_sysfs.c |5 -
2 files changed, 4 insertions(+), 2 deletions(-)

diff -upr linux/net/bluetooth/hci_conn.c linux.new/net/bluetooth/hci_conn.c
--- linux/net/bluetooth/hci_conn.c  2008-02-16 06:38:56.0 +0800
+++ linux.new/net/bluetooth/hci_conn.c  2008-02-16 06:54:17.0 +0800
@@ -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 -upr linux/net/bluetooth/hci_sysfs.c linux.new/net/bluetooth/hci_sysfs.c
--- linux/net/bluetooth/hci_sysfs.c 2008-02-16 06:38:56.0 +0800
+++ linux.new/net/bluetooth/hci_sysfs.c 2008-02-16 06:54:17.0 +0800
@@ -333,15 +333,18 @@ static int __match_tty(struct device *de
 
 static void del_conn(struct work_struct *work)
 {
-   struct device *dev;
struct hci_conn *conn = container_of(work, struct hci_conn, work);
+   struct hci_dev *hdev = conn-hdev;
+   struct device *dev;
 
while (dev = device_find_child(conn-dev, NULL, __match_tty)) {
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 netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html