public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Bluetooth: Avoid centralized adv handle tracking for extended features
@ 2021-04-05 23:33 Daniel Winkler
  2021-04-05 23:33 ` [PATCH 1/2] Bluetooth: Use ext adv handle from requests in CCs Daniel Winkler
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Daniel Winkler @ 2021-04-05 23:33 UTC (permalink / raw)
  To: marcel, linux-bluetooth
  Cc: chromeos-bluetooth-upstreaming, Daniel Winkler, David S. Miller,
	Jakub Kicinski, Johan Hedberg, Luiz Augusto von Dentz,
	linux-kernel, netdev

Hi Maintainers,

This series addresses a race condition where an advertisement
registration can conflict with a software rotation advertisement
refresh. I found that this issue was only occurring with the new
extended MGMT advertising interface. A bad use of the
hdev->cur_adv_instance caused every new instance to be immediately sent
to the controller rather than queued for software rotation, opening a
path for the race to occur.

This series improves the way new extended advertising hci callbacks
track the relevant adv handle, removing the need for the
cur_adv_instance use. In a separate patch, the incorrect usage of
cur_adv_instance is removed, to align the extended MGMT commands to the
original add_advertising usage. The series was tested on both extended
and non-extended bluetooth controllers to confirm that the race
condition is resolved, and that multi- and single-advertising automated
test scenarios are still successful.

Thanks in advance,
Daniel


Daniel Winkler (2):
  Bluetooth: Use ext adv handle from requests in CCs
  Bluetooth: Do not set cur_adv_instance in adv param MGMT request

 net/bluetooth/hci_event.c | 16 +++++++---------
 net/bluetooth/mgmt.c      |  1 -
 2 files changed, 7 insertions(+), 10 deletions(-)

-- 
2.31.0.208.g409f899ff0-goog


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-06  8:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-05 23:33 [PATCH 0/2] Bluetooth: Avoid centralized adv handle tracking for extended features Daniel Winkler
2021-04-05 23:33 ` [PATCH 1/2] Bluetooth: Use ext adv handle from requests in CCs Daniel Winkler
2021-04-05 23:33 ` [PATCH 2/2] Bluetooth: Do not set cur_adv_instance in adv param MGMT request Daniel Winkler
2021-04-06  8:44 ` [PATCH 0/2] Bluetooth: Avoid centralized adv handle tracking for extended features Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox