From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20FA6C43461 for ; Tue, 6 Apr 2021 08:44:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EE3F061074 for ; Tue, 6 Apr 2021 08:44:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244463AbhDFIo6 (ORCPT ); Tue, 6 Apr 2021 04:44:58 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:41320 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244417AbhDFIo5 (ORCPT ); Tue, 6 Apr 2021 04:44:57 -0400 Received: from marcel-macbook.holtmann.net (p4ff9fed5.dip0.t-ipconnect.de [79.249.254.213]) by mail.holtmann.org (Postfix) with ESMTPSA id D6E8ECED1D; Tue, 6 Apr 2021 10:52:30 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: [PATCH 0/2] Bluetooth: Avoid centralized adv handle tracking for extended features From: Marcel Holtmann In-Reply-To: <20210405233305.92431-1-danielwinkler@google.com> Date: Tue, 6 Apr 2021 10:44:48 +0200 Cc: linux-bluetooth , CrosBT Upstreaming , "David S. Miller" , Jakub Kicinski , Johan Hedberg , Luiz Augusto von Dentz , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: References: <20210405233305.92431-1-danielwinkler@google.com> To: Daniel Winkler X-Mailer: Apple Mail (2.3654.60.0.2.21) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel, > 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(-) both patches have been applied to bluetooth-next tree. Regards Marcel