From: Mikko Rapeli <mikko.rapeli@iki.fi>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] apply rfcomm oops fix?
Date: Tue, 17 Jul 2007 22:16:09 +0300 [thread overview]
Message-ID: <20070717191609.GG1376@nalle> (raw)
Hello,
This bugzilla entry http://bugzilla.kernel.org/show_bug.cgi?id=7509 has
been open for a while and my fix proposal this. I think it makes sence
for rfcomm socket ioctl, which releases the device, to gracefully
(tty_v)hangup the tty layer too. Could this be applied or is there some
problem with this one liner?
--- linux-2.6.22-rc5.orig/net/bluetooth/rfcomm/tty.c 2007-07-01 14:20:00.000000000 +0300
+++ linux-2.6.22-rc5/net/bluetooth/rfcomm/tty.c 2007-07-01 13:55:35.000000000 +0300
@@ -395,6 +397,10 @@
if (req.flags & (1 << RFCOMM_HANGUP_NOW))
rfcomm_dlc_close(dev->dlc, 0);
+ /* Be nice and shut down tty(s) synchronously before
+ * freeing rfcomm_dev */
+ if (dev->tty) tty_vhangup(dev->tty);
+
rfcomm_dev_del(dev);
rfcomm_dev_put(dev);
return 0;
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next reply other threads:[~2007-07-17 19:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-17 19:16 Mikko Rapeli [this message]
2007-07-17 19:55 ` [Bluez-devel] apply rfcomm oops fix? Marcel Holtmann
2007-07-17 20:12 ` Mikko Rapeli
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=20070717191609.GG1376@nalle \
--to=mikko.rapeli@iki.fi \
--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