# This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/03/18 13:25:42+01:00 marcel@holtmann.org # [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 # # net/bluetooth/rfcomm/core.c # 2005/03/18 13:24:00+01:00 marcel@holtmann.org +4 -0 # Fix session reference counting for RFCOMM # diff -Nru a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c --- a/net/bluetooth/rfcomm/core.c 2005-03-18 13:30:07 +01:00 +++ b/net/bluetooth/rfcomm/core.c 2005-03-18 13:30:07 +01: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;