ChangeSet 1.2229.1.2, 2005/03/18 13:25:42+01:00, [EMAIL PROTECTED]

        [Bluetooth] Fix session reference counting for RFCOMM
        
        When an incoming connection terminates, the signal DLC is never
        closed and thus the underlaying L2CAP connection stays open. This
        problem doesn't show up often, because most times the other side
        takes care of terminating the signal DLC.
        
        Signed-off-by: Marcel Holtmann <[EMAIL PROTECTED]>



 core.c |    4 ++++
 1 files changed, 4 insertions(+)


diff -Nru a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
--- a/net/bluetooth/rfcomm/core.c       2005-03-18 14:08:32 -08:00
+++ b/net/bluetooth/rfcomm/core.c       2005-03-18 14:08:32 -08:00
@@ -389,6 +389,8 @@
                rfcomm_dlc_unlock(d);
 
                skb_queue_purge(&d->tx_queue);
+               rfcomm_session_put(s);
+
                rfcomm_dlc_unlink(d);
        }
 
@@ -597,6 +599,8 @@
                *err = -ENOMEM;
                goto failed;
        }
+
+       rfcomm_session_hold(s);
 
        s->initiator = 1;
 
-
To unsubscribe from this list: send the line "unsubscribe bk-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