All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Gianluca Anzolin <gianluca@sottospazio.it>
Cc: gustavo@padovan.org, marcel@holtmann.org,
	linux-bluetooth@vger.kernel.org, gregkh@linuxfoundation.org,
	jslaby@suse.cz
Subject: Re: [PATCH v5 0/6] rfcomm: Implement rfcomm as a proper tty_port
Date: Wed, 31 Jul 2013 13:50:31 -0400	[thread overview]
Message-ID: <51F94E67.3040402@hurleysoftware.com> (raw)
In-Reply-To: <1375110493-5237-1-git-send-email-gianluca@sottospazio.it>

On 07/29/2013 11:08 AM, Gianluca Anzolin wrote:
> This patchset addresses an issue with the rfcomm tty driver in the
> current stable kernels that manifests itself as a sudden lockup of the
> whole machine or as a OOPS if we are lucky enough (I wasn't).
>
> Triggering the problem is very easy:
>
> 1) establish a bluetooth connection with a bluetooth host
> 2) open the tty it provides with some program
> 3) turn off the bluetooth host or take it out of range
>
> After a timeout the machine freezes.
>
> Another way to trigger these lockups is to simply release the rfcomm
> tty.
>
> This happens beacuse the underlying tty_struct objects and tty_port
> objects are freed while being used: the code doesn't take proper
> references to them.
>
> The following patches address the problem by implementing a proper
> tty_port driver for rfcomm.
>
> There are still some issues left: one relevant to flow control (which is
> also missing in the current code) and another relevant to a corner case
> in rfcomm_dev_state_change() that I intend to fix with a future patch.
> They are commented with a FIXME.
>
> Changes from v4:
>    [PATCH 3/6]: left the debug message in rfcomm_tty_open()
>    [PATCH 5/6]: always use !test_and_set_bit() to release the tty_port

I reviewed these changes and retested. All ok.

Regards,
Peter Hurley

>
> Thank you,
> Gianluca
>
> Gianluca Anzolin (6):
>    rfcomm: Take proper tty_struct references
>    rfcomm: Remove the device from the list in the destructor
>    rfcomm: Move the tty initialization and cleanup out of open/close
>    rfcomm: Implement .activate, .shutdown and .carrier_raised methods
>    rfcomm: Fix the reference counting of tty_port
>    rfcomm: Purge the dlc->tx_queue to avoid circular dependency
>
>   net/bluetooth/rfcomm/tty.c | 271 +++++++++++++++++++++------------------------
>   1 file changed, 126 insertions(+), 145 deletions(-)
>

  parent reply	other threads:[~2013-07-31 17:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29 15:08 [PATCH v5 0/6] rfcomm: Implement rfcomm as a proper tty_port Gianluca Anzolin
2013-07-29 15:08 ` [PATCH v5 1/6] rfcomm: Take proper tty_struct references Gianluca Anzolin
2013-07-29 15:08 ` [PATCH v5 2/6] rfcomm: Remove the device from the list in the destructor Gianluca Anzolin
2013-07-29 15:08 ` [PATCH v5 3/6] rfcomm: Move the tty initialization and cleanup out of open/close Gianluca Anzolin
2013-07-29 15:08 ` [PATCH v5 4/6] rfcomm: Implement .activate, .shutdown and .carrier_raised methods Gianluca Anzolin
2013-07-29 15:08 ` [PATCH v5 5/6] rfcomm: Fix the reference counting of tty_port Gianluca Anzolin
2013-07-29 15:08 ` [PATCH v5 6/6] rfcomm: Purge the dlc->tx_queue to avoid circular dependency Gianluca Anzolin
2013-08-20  9:21   ` Gustavo Padovan
2013-08-21  8:41     ` Gianluca Anzolin
2013-07-31 17:50 ` Peter Hurley [this message]
2013-08-19 20:20   ` [PATCH v5 0/6] rfcomm: Implement rfcomm as a proper tty_port Peter Hurley
2013-08-27 13:57     ` Alexander Holler
2013-08-27 17:50       ` Peter Hurley
2013-08-28 11:24         ` Alexander Holler
2013-08-30 17:49         ` Gianluca Anzolin
2013-08-30 21:26           ` Alexander Holler
2013-08-30 22:02           ` Peter Hurley

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=51F94E67.3040402@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=gianluca@sottospazio.it \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavo@padovan.org \
    --cc=jslaby@suse.cz \
    --cc=linux-bluetooth@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.