From: "Dave Young" <hidave.darkstar@gmail.com>
To: "Marcel Holtmann" <marcel@holtmann.org>
Cc: linux-kernel@vger.kernel.org, bluez-devel@lists.sourceforge.net
Subject: Re: [PATCH]bluetooth rfcomm_dev refcount bug fix
Date: Tue, 6 Nov 2007 11:12:09 +0800 [thread overview]
Message-ID: <a8e1da0711051912r34c6ad68jc420ceb8655407b7@mail.gmail.com> (raw)
In-Reply-To: <1194274870.4437.8.camel@aeonflux>
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
On 11/5/07, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi Dave,
>
> > In the rfcomm_tty_hangup the rfcomm_dev refcnt should be dropped later.
> >
> > If rfcomm_dev is destructed in tty_hangup function, then the later tty_close function will oops.
>
> your patch removes the complete release on hangup logic. That can't be
> right. I think the problem is with calling tty_vhangup() and then
> decrementing the reference count. In case we call tty_vhangup and we
> have release on hangup we should not delete the device here. What about
> the attached patch? Does it solve it?
>
How about this patch (attached), it works for me as well.
Regards
dave
[-- Attachment #2: diff.rfcomm.1 --]
[-- Type: application/octet-stream, Size: 429 bytes --]
diff -upr linux/net/bluetooth/rfcomm/tty.c linux.new/net/bluetooth/rfcomm/tty.c
--- linux/net/bluetooth/rfcomm/tty.c 2007-11-05 11:28:49.000000000 +0800
+++ linux.new/net/bluetooth/rfcomm/tty.c 2007-11-06 11:13:02.000000000 +0800
@@ -426,7 +426,6 @@ static int rfcomm_release_dev(void __use
tty_vhangup(dev->tty);
rfcomm_dev_del(dev);
- rfcomm_dev_put(dev);
return 0;
}
Only in linux.new/net/bluetooth/rfcomm: tty.c~
next prev parent reply other threads:[~2007-11-06 3:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-05 4:59 Dave Young
2007-11-05 15:01 ` Marcel Holtmann
2007-11-06 1:23 ` Dave Young
2007-11-06 3:12 ` Dave Young [this message]
2007-11-19 3:00 ` [PATCH][another try]bluetooth rfcomm tty_close before destruct Dave Young
2007-11-19 4:57 ` Dave Young
2007-11-06 6:00 [PATCH]bluetooth rfcomm_dev refcount bug fix Dave Young
2007-11-06 13:33 ` Marcel Holtmann
2007-11-07 1:20 ` Dave Young
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=a8e1da0711051912r34c6ad68jc420ceb8655407b7@mail.gmail.com \
--to=hidave.darkstar@gmail.com \
--cc=bluez-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
/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
all inboxes | Powered by JetHome®