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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E58E3C433F5 for ; Wed, 16 Mar 2022 15:32:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353997AbiCPPdb convert rfc822-to-8bit (ORCPT ); Wed, 16 Mar 2022 11:33:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241366AbiCPPda (ORCPT ); Wed, 16 Mar 2022 11:33:30 -0400 Received: from mail.holtmann.org (coyote.holtmann.net [212.227.132.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EBFE46CA74 for ; Wed, 16 Mar 2022 08:32:15 -0700 (PDT) Received: from smtpclient.apple (p5b3d2183.dip0.t-ipconnect.de [91.61.33.131]) by mail.holtmann.org (Postfix) with ESMTPSA id 268DECECF8; Wed, 16 Mar 2022 16:32:15 +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: <20220316152027.9988-1-dossche.niels@gmail.com> Date: Wed, 16 Mar 2022 16:32:14 +0100 Cc: netdev@vger.kernel.org, Johan Hedberg , Luiz Augusto von Dentz Content-Transfer-Encoding: 8BIT Message-Id: <03B539EF-D2F4-4345-A6F9-F2F77CAA41C5@holtmann.org> References: <20220316152027.9988-1-dossche.niels@gmail.com> To: Niels Dossche X-Mailer: Apple Mail (2.3696.80.82.1.1) Precedence: bulk List-ID: X-Mailing-List: netdev@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(+) please send net/bluetooth/ to linux-bluetooth mailing list. Regards Marcel