Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp917027pxp; Wed, 16 Mar 2022 21:13:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyielNA5F7+GgnasGn1X5WPKbseGvmDYyiNqBgkh9JQyMHB2zIOTvTuJnVwEhxxrTc0SRxL X-Received: by 2002:a05:6a00:174e:b0:4f7:6590:6d6d with SMTP id j14-20020a056a00174e00b004f765906d6dmr2729583pfc.71.1647490420025; Wed, 16 Mar 2022 21:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647490420; cv=none; d=google.com; s=arc-20160816; b=dedZiuhpH1VuAinAIBETHw2ENRBtU/pIOXcXRPn+tr4z/YYL+ueskftYXvZkyln3yv 2knps/pE4NQdoQy4lBlaSHCBmPrjfo3psaraHbjva6PeX7az2fEpxox8Lj0aj4cVY2En rORHwZwEoSD8TyIr/UvZ0tfJ75/aZZhL9HJunCFXukiAJ4WYepM4WYSr0T1Dhf65Eo07 Bg44Q+luLL9ULphZmd164ncKLEOdoO91mIFAicJIhw6WIi0IosEY2mNTvvG3TcCBbG9w latbvzRM8pNxAfri3tplobCBCOhCyU3/CaX0jAc9neFX/+t+H6veKBgsnXekBmPL8j/A Cx6Q== 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=IBzwbFBkWT+dDnMmlD+VLh1kaVj1eqYSXh1eA8SYV9o=; b=pkIS1E9j3I1IdkCnPe2gu5r3+ERIFe6qHC8gzsY4z/lkmWbxupu2nB95WwOJuNdvjK uJsqhtpbEPAJVm2AoaMWc3K14DFQI/SGkoTMjpbiMKapW3vQ7d1Nd+eMjVq8CoXK3A/Q 2geamlWBRzvHW9fxp6fgMTQpqLDuv945V6NP7v7W7UjwVRCFbRPWEnZsZhdiMBtl0gUq tB6Jz9+1McB6/GerVcooCmKhXF06TtOXz2SToDnjUtbqixVmQsVW8Kc5YSWtKQB99n9Y pywYyGgcmBzp7LcIV2Hg6hrkZa9DES6Ow9ZpkCKycMjRZ+71CdwnkihLalb/aiUyDDLa y91A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m12-20020a056a00080c00b004f778a4e80csi3993485pfk.377.2022.03.16.21.13.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 21:13:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AA3BBB82C4; Wed, 16 Mar 2022 20:51:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351737AbiCPPjo convert rfc822-to-8bit (ORCPT + 99 others); Wed, 16 Mar 2022 11:39:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239846AbiCPPjn (ORCPT ); Wed, 16 Mar 2022 11:39:43 -0400 Received: from mail.holtmann.org (coyote.holtmann.net [212.227.132.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2328D34B8E for ; Wed, 16 Mar 2022 08:38:29 -0700 (PDT) Received: from smtpclient.apple (p5b3d2183.dip0.t-ipconnect.de [91.61.33.131]) by mail.holtmann.org (Postfix) with ESMTPSA id 39F7ACECF8; Wed, 16 Mar 2022 16:38:28 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: [PATCH] Bluetooth: call hci_le_conn_failed with hdev lock in hci_le_conn_failed From: Marcel Holtmann In-Reply-To: <20220316153350.10047-1-dossche.niels@gmail.com> Date: Wed, 16 Mar 2022 16:38:27 +0100 Cc: BlueZ , Johan Hedberg , Luiz Augusto von Dentz Content-Transfer-Encoding: 8BIT Message-Id: <99A3F96C-2926-463D-ABF6-5344CE8DC6B2@holtmann.org> References: <20220316153350.10047-1-dossche.niels@gmail.com> To: Niels Dossche X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Niels, > hci_le_conn_failed function's documentation says that the caller must > hold hdev->lock. The only callsite that does not hold that lock is > hci_le_conn_failed. The other 3 callsites hold the hdev->lock very > locally. The solution is to hold the lock during the call to > hci_le_conn_failed. > > Fixes: 3c857757ef6e ("Bluetooth: Add directed advertising support through connect()") > Signed-off-by: Niels Dossche > --- > net/bluetooth/hci_conn.c | 2 ++ > 1 file changed, 2 insertions(+) patch has been applied to bluetooth-next tree. Regards Marcel