Skip to content

RFC Bluetooth: Don't force MGMT device connected

Luiz Augusto von Dentz linux-bluetooth 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Bluetooth: L2CAP: Use l2cap_request_info whenever requesting infonet/bluetooth/l2cap_core.c+2 -120 replies
2/3Bluetooth: Don't force MGMT device connected on L2CAP connection requestinclude/net/bluetooth/hci_core.h include/net/bluetooth/l2cap.h net/bluetooth/hci_event.c +1 more+112 -130 replies
3/3Bluetooth: L2CAP: Rework code around Connect Responsenet/bluetooth/l2cap_core.c+100 -1700 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/3] Bluetooth: Don't force MGMT device connected

From: Luiz Augusto von Dentz <[email protected]>

This set attempt to fix a race where Read Name command is pending but L2CAP connection request comes in which forced MGMT Device Connected event to allow userspace to handle the incoming connection causing the device to have no name.

In order to fix this the code will no longer send the event and instead will put the socket into BT_CONNECT2 and respond with pending result, then once Read Name completes it will continue the connection handling and emit Device Connected event with a proper name.

Preliminary test did not show any regression but there could devices that don't behave well if there are multiple responses with pending result so this has to go more extensive testing thus why Im sending first as RFC.

Luiz Augusto von Dentz (3):
Bluetooth: L2CAP: Use l2cap_request_info whenever requesting info
Bluetooth: Don't force MGMT device connected on L2CAP connection
request
Bluetooth: L2CAP: Rework code around Connect Response

 include/net/bluetooth/hci_core.h |  13 ++
 include/net/bluetooth/l2cap.h    |   1 +
 net/bluetooth/hci_event.c        |  16 ++-
 net/bluetooth/l2cap_core.c       | 287 +++++++++++++++++++--------------------
 4 files changed, 168 insertions(+), 149 deletions(-)
Signature · 1 line
2.9.3