Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 366926 Details for
Bug 474432
>=sys-kernel/gentoo-sources-3.8 - Ripup of bluetooth rfcomm causes oops/machine hang.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
part one of 3.12.6 userspace bug of rfcomm
rfc3.patch (text/plain), 1.29 KB, created by
Ben
on 2014-01-04 04:43:27 UTC
(
hide
)
Description:
part one of 3.12.6 userspace bug of rfcomm
Filename:
MIME Type:
Creator:
Ben
Created:
2014-01-04 04:43:27 UTC
Size:
1.29 KB
patch
obsolete
>diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c >index 84fcf9f..0357dcf 100644 >--- a/net/bluetooth/rfcomm/tty.c >+++ b/net/bluetooth/rfcomm/tty.c >@@ -437,7 +437,8 @@ static int rfcomm_release_dev(void __user *arg) > tty_kref_put(tty); > } > >- if (!test_and_set_bit(RFCOMM_TTY_RELEASED, &dev->flags)) >+ if (!test_bit(RFCOMM_RELEASE_ONHUP, &dev->flags) && >+ !test_and_set_bit(RFCOMM_TTY_RELEASED, &dev->flags)) > tty_port_put(&dev->port); > > tty_port_put(&dev->port); >@@ -673,6 +674,14 @@ static int rfcomm_tty_install(struct tty_driver *driver, struct tty_struct *tty) > if (err) > rfcomm_tty_cleanup(tty); > >+ /* take over the tty_port reference if it was created with the >+ * flag RFCOMM_RELEASE_ONHUP. This will force the release of the port >+ * when the last process closes the tty. This behaviour is expected by >+ * userspace. >+ */ >+ if (test_bit(RFCOMM_RELEASE_ONHUP, &dev->flags)) >+ tty_port_put(&dev->port); >+ > return err; > } > >@@ -1010,10 +1019,6 @@ static void rfcomm_tty_hangup(struct tty_struct *tty) > BT_DBG("tty %p dev %p", tty, dev); > > tty_port_hangup(&dev->port); >- >- if (test_bit(RFCOMM_RELEASE_ONHUP, &dev->flags) && >- !test_and_set_bit(RFCOMM_TTY_RELEASED, &dev->flags)) >- tty_port_put(&dev->port); > } > > static int rfcomm_tty_tiocmget(struct tty_struct *tty)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 474432
:
351696
| 366926 |
366928
|
368038
|
368044
|
368046
|
368048