linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Holler <holler@ahsoftware.de>
To: Gustavo Padovan <gustavo@padovan.org>,
	Gianluca Anzolin <gianluca@sottospazio.it>,
	peter@hurleysoftware.com, marcel@holtmann.org,
	linux-bluetooth@vger.kernel.org, gregkh@linuxfoundation.org,
	jslaby@suse.cz, linux-kernel@vger.kernel.org
Subject: [REGRESSION] rfcomm (userland) broken by commit 29cd718b
Date: Thu, 12 Dec 2013 21:11:00 +0100	[thread overview]
Message-ID: <52AA1854.500@ahsoftware.de> (raw)
In-Reply-To: <20130919162413.GG4006@joana>

Hello,

since commit 29cd718beba999bda4bdbbf59b5a4d25c07e1547 "rfcomm: don't 
release the port in rfcomm_dev_state_change()" the userland utility 
rfcomm (both from bluez 4.101 and 5.12) is broken.

In detail the following note in the patch

Am 19.09.2013 18:24, schrieb Gustavo Padovan:
> Hi Gianluca,
>
> 2013-08-27 Gianluca Anzolin <gianluca@sottospazio.it>:
>
>> When the dlc is closed, rfcomm_dev_state_change() tries to release the
>> port in the case it cannot get a reference to the tty. However this is
>> racy and not even needed.
>>
>> Infact as Peter Hurley points out:

(...)

>> 4. After releasing the dlc lock in rfcomm_dev_add(),
>>     rfcomm_dev_state_change() will 'see' an incomplete rfcomm_dev if a
>>     tty reference could not be obtained. Again, the best thing to do here
>>     is nothing. Any future attempted open() will block on
>>     rfcomm_dev_carrier_raised(). The unconnected device will exist until
>>     released by ioctl(RFCOMMRELEASEDEV).
>>
>> The patch removes the aforementioned code and uses the
>> tty_port_tty_hangup() helper to hangup the tty.

reads like the usage of that ioctl now necessary.

What currently happens is that when one kills rfcomm (and any other 
terminal which might use that tty), the entry in /dev doesn't disappear. 
That means the same call to refcomm with the same device (e.g. 
[/dev/]rfcomm1 doesn't work.

My current solution is to just revert that commit.
I haven't tested if modifying (the userland utility) rfcomm (adding that 
ioctl) will help, but that looks only like a longterm solution.

Regards,

Alexander Holler

  reply	other threads:[~2013-12-12 20:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 16:28 [PATCH] rfcomm: don't release the port in rfcomm_dev_state_change() Gianluca Anzolin
2013-09-18  1:19 ` Peter Hurley
2013-09-19 16:24 ` Gustavo Padovan
2013-12-12 20:11   ` Alexander Holler [this message]
2013-12-12 20:36     ` [REGRESSION] rfcomm (userland) broken by commit 29cd718b Peter Hurley
2013-12-12 23:35       ` Alexander Holler
2013-12-15 11:24         ` Gianluca Anzolin
2013-12-15 14:03           ` Peter Hurley
2013-12-15 15:08             ` Gianluca Anzolin
2013-12-15 17:54               ` Alexander Holler
2013-12-16 19:34               ` Peter Hurley
2013-12-16 20:20                 ` Gianluca Anzolin
2013-12-16 20:27                   ` Gianluca Anzolin
2013-12-16 20:58                     ` Gianluca Anzolin
2013-12-16 21:15                       ` Gianluca Anzolin
2013-12-24 13:21                         ` Alexander Holler
2013-12-27 23:01                         ` Benson Chow
2013-12-28  8:44                           ` Gianluca Anzolin
2014-01-04  4:32                             ` Benson Chow

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=52AA1854.500@ahsoftware.de \
    --to=holler@ahsoftware.de \
    --cc=gianluca@sottospazio.it \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavo@padovan.org \
    --cc=jslaby@suse.cz \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=peter@hurleysoftware.com \
    /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;
as well as URLs for NNTP newsgroup(s).