Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4070538pxf; Tue, 6 Apr 2021 07:18:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDVhcz/Mw7D//F5/BvgiOZA6FWHUZBeMBQaaKc35cREBCAgp8axeCJxC5bjrrKdMzaCwIR X-Received: by 2002:a05:6402:4242:: with SMTP id g2mr37824045edb.329.1617718733527; Tue, 06 Apr 2021 07:18:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617718733; cv=none; d=google.com; s=arc-20160816; b=LnvUhDoIPeiPVx3HEX3H8cVFIdberPVBztvMYFiFIs+y4T8W3kHxc1pmsNk1WlVnxr Z8POSBypEbgQJRb4rtyO1Rsx0qPKANs06xJkTBuBfAi7rYrmtSOm6nYRBcsKvD6CLz5S NMqbFJWLrCQ18cLb2P2QA+FEKrlkdigyk+30/xYU8eOI7h6pgNwZ6FAHHJ8eoY5tFdii db0dNofQGWFyG8x+z/2bqGSernfHnUUg0ZIs+xQoXeZEw56VEM4OUn2s1uCcRtOV25oj SRdDpa0Epj5BRqc6/USLqBAc6W/SBNFRWGCMbEP9YEpFnoZIemg6CyK7l7l5yvb0JTqR BW+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=Id0pbxsv/wqXA/R4RA6k/4mHUb2eLDE60/Bs335sN7Y=; b=RDkRmvPZlBLDqypDp9szYYY2VRk639q7InShx9TOpxv7N069GkCU852nMTFwTcKAL6 E+H50x/7Qkfd4nS57Ve6eNZ72VZp5c5Lverl2RoxDak4sMB4G35Pw3QgxRflzgYKwX08 dNYhcPMtlFGDbaJOXG2ydwKY6SJk/QJQEiRWS1qQ0bYs+s/HMlb8wlgGxtrQHRUOJzVr OkdRY27dgm6sZe+SzASK7a8Sih+TCBZhlpfVhOqgn64+oJy6GCz2+hg2a1O5R03cy48B X/cuJRYNZujxldtO54GIHbaf8fpbqsY2ceXdFmYtZgUa9FE0GNRoZQxk08pADbLRgAX4 em4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s17si9081638eds.594.2021.04.06.07.18.29; Tue, 06 Apr 2021 07:18:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244456AbhDFIo6 (ORCPT + 99 others); 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