linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: "Gustavo F. Padovan" <gustavo@padovan.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	"open list:BLUETOOTH DRIVERS" <linux-bluetooth@vger.kernel.org>,
	linux-kernel@vger.kernel.org, jason.abele@gmail.com
Subject: Re: [PATCH 0/4] Bluetooth: hci_uart: various fixes
Date: Tue, 30 Aug 2016 19:22:50 +0200	[thread overview]
Message-ID: <20160830192250.40eea3cf@bbrezillon> (raw)
In-Reply-To: <0649B498-A8BC-42D1-8F70-07B3C8CAB8E2@holtmann.org>

Hi Marcel,

On Tue, 30 Aug 2016 09:48:13 -0700
Marcel Holtmann <marcel@holtmann.org> wrote:

> Hi Boris,
> 
> > We recently faced some problems when using an BT uart chip interfaced
> > through the H5 proto (rtk_h5). Here are the logs of the 2 different
> > issues we had when closing the line discipline (actually, restoring
> > the previous one) [1][2]. I know the kernel is Tainted in those logs,
> > but after some investigations I found a few potential issues that might
> > explain what we're seeing.  
> 
> while I can look through these patches, but I wonder when we are finally getting a full and proper RTK support that doesn't use these hackish hciattach code I have seen.
> 
> I mean the only thing userspace should be doing is attaching the line discipline and then everything else should run inside the kernel. Attaching the line discipline is the same as plugging in an USB dongle. Detaching it is the same as unplugging the dongle. That is how we should treat it. So for the lifetime of a system it should never detach. All the power control etc. should be done inside the kernel. Same as how we have done it for Broadcom and Intel devices.

Well, I'm completely new to the bluetooth stack, and while the
'hciattach/in-kernel driver' interaction does seem weird to me, I
definitely can't tell whether it's good or bad.

I just sent those patches because I was facing kernel panics.

Still, I don't get your argument about allowing a user to attach the
line discipline, but preventing him from detaching it. The races exist,
so even if you decide that the line discipline cannot be detached, how
do you plan to handle module unloading (maybe you don't want to allow
that either)?

One last comment. Even after applying those fixes I'm still facing
panics [1], so there are probably other racy portions in the code.

Anyway, tanks for your review.

Boris

[1]http://code.bulix.org/b5td9x-105502

  reply	other threads:[~2016-08-30 17:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-19  7:38 [PATCH 0/4] Bluetooth: hci_uart: various fixes Boris Brezillon
2016-08-19  7:38 ` [PATCH 1/4] Bluetooth: hci_ldisc: fix a race in the hdev closing path Boris Brezillon
2016-08-30 16:53   ` Marcel Holtmann
2016-08-30 17:08     ` Boris Brezillon
2016-08-19  7:38 ` [PATCH 2/4] Bluetooth: hci_h5: fix a race in the " Boris Brezillon
2016-08-30 16:54   ` Marcel Holtmann
2016-08-19  7:38 ` [PATCH 3/4] Bluetooth: hci_ldisc: don't release resources in hci_uart_init_work() Boris Brezillon
2016-08-19  7:38 ` [PATCH 4/4] Bluetooth: hci_ldisc: make sure we don't loose HCI_UART_TX_WAKEUP events Boris Brezillon
2016-08-30 16:53   ` Marcel Holtmann
2016-08-30 17:10     ` Boris Brezillon
2016-08-30 13:26 ` [PATCH 0/4] Bluetooth: hci_uart: various fixes Boris Brezillon
2016-08-30 16:48 ` Marcel Holtmann
2016-08-30 17:22   ` Boris Brezillon [this message]
2016-08-31  2:08     ` Marcel Holtmann

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=20160830192250.40eea3cf@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=gustavo@padovan.org \
    --cc=jason.abele@gmail.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@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).