mbox series

[BlueZ,0/1] V3: Fix busy loop when disabling BT

Message ID 20240404183050.334414-1-dimitris.on.linux@gmail.com
Headers show
Series V3: Fix busy loop when disabling BT | expand

Message

Dimitris April 4, 2024, 6:30 p.m. UTC
Splitting the service state test out of btd_device_is_connected
and using only the bearer-specific test from adapter_remove_connection.

This intends to fix a busy loop that happens when BT is disabled
from userspace with e.g. "rfkill block bluetooth":

1. Connect at least one device.
2. Run rfkill block bluetooth.
3. bluetoothd takes 100% CPU.

Bug reports:
https://github.com/bluez/bluez/issues/785
https://bugzilla.redhat.com/show_bug.cgi?id=2269516

Dimitris (1):
  refactor bearer connected test

 src/adapter.c | 2 +-
 src/device.c  | 7 ++++++-
 src/device.h  | 1 +
 3 files changed, 8 insertions(+), 2 deletions(-)

Comments

patchwork-bot+bluetooth@kernel.org April 4, 2024, 6:50 p.m. UTC | #1
Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Thu,  4 Apr 2024 11:30:49 -0700 you wrote:
> Splitting the service state test out of btd_device_is_connected
> and using only the bearer-specific test from adapter_remove_connection.
> 
> This intends to fix a busy loop that happens when BT is disabled
> from userspace with e.g. "rfkill block bluetooth":
> 
> 1. Connect at least one device.
> 2. Run rfkill block bluetooth.
> 3. bluetoothd takes 100% CPU.
> 
> [...]

Here is the summary with links:
  - [BlueZ,1/1] refactor bearer connected test
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=036583f9bbec

You are awesome, thank you!