Linux bluetooth development
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] Connection with aphonestaysopenafterclosingRFCOMM channel
Date: Wed, 09 Mar 2005 18:52:09 +0100	[thread overview]
Message-ID: <1110390729.5462.21.camel@notepaq> (raw)
In-Reply-To: <1109952903.8058.72.camel@pegasus>

[-- Attachment #1: Type: text/plain, Size: 495 bytes --]

Hi Victor,

> > Hope that explains....
> 
> it does not explain it, but this is what I expected. Another reference
> counting problem. Maybe introduced at that time I fixed another one of
> these crazy problems. Funny is that this does not result in an oops. The
> easiest way to fix this is, if you send me one of these phones, because
> otherwise it will take quite some time to reproduce it.

try the attached patch. It fixes it for me when I tested this with a
Nokia 6310.

Regards

Marcel


[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 436 bytes --]

===== net/bluetooth/rfcomm/core.c 1.49 vs edited =====
--- 1.49/net/bluetooth/rfcomm/core.c	2005-01-23 19:59:56 +01:00
+++ edited/net/bluetooth/rfcomm/core.c	2005-03-09 11:27:46 +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;
 

      reply	other threads:[~2005-03-09 17:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-03 20:16 [Bluez-devel] Connection with aphonestaysopenafterclosingRFCOMM channel Victor Shcherbatyuk
2005-03-04 16:15 ` Marcel Holtmann
2005-03-09 17:52   ` Marcel Holtmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1110390729.5462.21.camel@notepaq \
    --to=marcel@holtmann.org \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox