From: Johan Hedberg <johan.hedberg@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Fix race condition with user channel and setup stage
Date: Mon, 8 Jun 2015 11:06:37 +0300 [thread overview]
Message-ID: <20150608080637.GA717@t440s.lan> (raw)
In-Reply-To: <1433563609-75812-1-git-send-email-marcel@holtmann.org>
Hi Marcel,
On Sat, Jun 06, 2015, Marcel Holtmann wrote:
> During the initial setup stage of a controller, the low-level transport
> is actually active. This means that HCI_UP is true. To avoid toggling
> the transport off and back on again for normal operation the kernel
> holds a grace period with HCI_AUTO_OFF that will turn the low-level
> transport off in case no user is present.
>
> The idea of the grace period is important to avoid having to initialize
> all of the controller twice. So legacy ioctl and the new management
> interface knows how to clear this grace period and then start normal
> operation.
>
> For the user channel operation this grace period has not been taken into
> account which results in the problem that HCI_UP and HCI_AUTO_OFF are
> set and the kernel will return EBUSY. However from a system point of
> view the controller is ready to be grabbed by either the ioctl, the
> management interface or the user channel.
>
> This patch brings the user channel to the same level as the other two
> entries for operating a controller.
>
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> Cc: stable@vger.kernel.org
> ---
> net/bluetooth/hci_sock.c | 26 +++++++++++++++++++-------
> 1 file changed, 19 insertions(+), 7 deletions(-)
Applied to bluetooth-next. Thanks.
Johan
prev parent reply other threads:[~2015-06-08 8:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-06 4:06 [PATCH] Bluetooth: Fix race condition with user channel and setup stage Marcel Holtmann
2015-06-08 8:06 ` Johan Hedberg [this message]
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=20150608080637.GA717@t440s.lan \
--to=johan.hedberg@gmail.com \
--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 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).