All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-bluetooth@vger.kernel.org
Subject: [Bug 204275] bluetoothd consumes 100% cpu on keyboard disconnect
Date: Thu, 25 Jul 2019 09:04:46 +0000	[thread overview]
Message-ID: <bug-204275-62941-FHtLbX10Wr@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-204275-62941@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=204275

--- Comment #8 from Steven Newbury (steve@snewbury.org.uk) ---
Luiz, did you see (In reply to Luiz Von Dentz from comment #6)
> Ive sent a fix upstream:
> 
> https://lore.kernel.org/linux-bluetooth/20190724110151.4258-1-luiz.
> dentz@gmail.com/T/#u
> 
> Let me know if that works.

Luiz, did you see the patch I attached?  Perhaps it's better to remove the old
watcher first than not add another if it exists, but it shouldn't happen
anyway.  The explicit remove should happen to catch the case where the
connection is broken before being fully initialised but the callback should get
triggered once data starts to flow over the encrypted channel.

In my tests, allowing the channel to fully close by removing the sec_watch
prevents the keyboard from ever connecting, this is because the callback never
gets triggered.  I believe the bug is caused by the refcount sec_watch creates
not being automatically removed because the callback is left pending, it
doesn't get removed on channel shutdown, but has the side-effect of making it
work with the channel being already open when the device reconnects because it
triggers the callback.

What made it work every time is changing sec_watch to wait for G_IO_IN instead
of G_IO_OUT, but presumably it is G_IO_OUT for a reason?

-- 
You are receiving this mail because:
You are the assignee for the bug.

  parent reply	other threads:[~2019-07-25  9:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22 13:36 [Bug 204275] New: bluetoothd consumes 100% cpu on keyboard disconnect bugzilla-daemon
2019-07-22 14:22 ` [Bug 204275] " bugzilla-daemon
2019-07-22 19:36 ` bugzilla-daemon
2019-07-22 20:54 ` bugzilla-daemon
2019-07-22 21:00 ` bugzilla-daemon
2019-07-22 23:56 ` bugzilla-daemon
2019-07-24 11:14 ` bugzilla-daemon
2019-07-24 15:31 ` bugzilla-daemon
2019-07-25  9:04 ` bugzilla-daemon [this message]
2019-07-25 13:13 ` bugzilla-daemon
2019-07-29 13:52 ` bugzilla-daemon
2019-07-29 13:56 ` bugzilla-daemon
2019-08-01 18:03 ` bugzilla-daemon
2019-08-10  7:40 ` bugzilla-daemon

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=bug-204275-62941-FHtLbX10Wr@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-bluetooth@vger.kernel.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.