Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3107216rwa; Mon, 22 Aug 2022 21:46:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR5xjM52SKOmvfnorhC94Xku2vO23rykFzT3a+14p6sVD+3e6+CLWB49wHnAGq2OfFa7v3SH X-Received: by 2002:a05:6402:35c:b0:43c:8f51:130 with SMTP id r28-20020a056402035c00b0043c8f510130mr1980044edw.393.1661229967354; Mon, 22 Aug 2022 21:46:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661229967; cv=none; d=google.com; s=arc-20160816; b=Oab/eGMVIAG4/j3daQlk6QzQXVEgpQn3vgM1vYWHdSj608S60Xt/BkOrLT2ag7uos6 535LIcbfCtwDOlH0dCOp8tXcyrzOXnBlpKEoYwI3PaGkoxhqphd9e2+rwRNndlt4hC2w YX2pkV3NaWYvqlsUzqh9Obsg3i1vfTd6/zfZxK1irFN0SOFzRN+C4UR2059NnWuCZXQf FKOtCipM2nk2LoSoNY2Fvk2GBh9zsni4NAjDvPalwB2qFtw5sro0gYc6TxJ8USgsYavl qS7VwfuSLafWHQTcA3FRJdjSPVpA1VOXL2TNhyhX/4FtM6dP28vRsAbHArZx+kYpVho4 o2iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=lUCov81UkiL3yx2Zk6OCNHheGGSC+JEtAVpS5cfgjxg=; b=uoPtOW2OOTs50vgwFyBCORh2BUiB8aCV9xDHwhY7HtHv4/eOOzERiYNFXUjALRs+yM QnAZPeiDkqRotb8VIZVUHo2Jddkj1ytLUp4yHCzCW9+EKOq8AExDqfCa+N7hKHjkOUYR O9hXAkBI5uFgBkno8TSMyB/0QLRv9N99vh2j7wFiYDRUdFEJKiDFLNk91ePRLuLNKIGP A5IVH24VGzqqaxU5sLaPoDNipayQScqr4nq5tvBV9UKTes5SwhnmJSIGhOXa9Y+Bu53v 26Ne+2X/Hy7cPCRmTG45UGcmevdYCdJKDdP/xkA54P7dyI2IMRRv9RGQS0DqNuE+xHSh qs4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=VQQRSuwF; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr40-20020a1709073fa800b00732d464930bsi14028386ejc.683.2022.08.22.21.45.40; Mon, 22 Aug 2022 21:46:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=VQQRSuwF; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236060AbiHWEom (ORCPT + 99 others); Tue, 23 Aug 2022 00:44:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233202AbiHWEoj (ORCPT ); Tue, 23 Aug 2022 00:44:39 -0400 Received: from mail-pj1-x104a.google.com (mail-pj1-x104a.google.com [IPv6:2607:f8b0:4864:20::104a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30BDD53005 for ; Mon, 22 Aug 2022 21:44:39 -0700 (PDT) Received: by mail-pj1-x104a.google.com with SMTP id m24-20020a17090b069800b001fac361aec2so5680884pjz.4 for ; Mon, 22 Aug 2022 21:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:mime-version:message-id:date:from:to:cc; bh=lUCov81UkiL3yx2Zk6OCNHheGGSC+JEtAVpS5cfgjxg=; b=VQQRSuwFAryakFZN7o3XBnaC86NJb8BJN0kRwrV1UIIXqU6A4bnuxTOScxrfAYh32h AFsHq3EqIR/7SXFP72lFWxUyEZczBThvbRXWGVEegkJk2vJM6nV72YXBmf1+lxt/IGvP yXHwxpKfsThjjhWZzQI8//FWRXgDqOU4sUnkrhBRsXHHnzbZnB/tLEREshRyt8/D0K1I 3K9o2H+mau3uY9LNULYduQ3LmFi8GnYNe9PwfLPaMjcivIR+H6Df56RSEu4sVvSlr/Gi lp3ApSG31oiReNNTdWxh1fI/2LArEf/6HjkzgcakX6PVq9Qzl1VXfuYHcq3FTJ+tRX8k k2pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc; bh=lUCov81UkiL3yx2Zk6OCNHheGGSC+JEtAVpS5cfgjxg=; b=RxlkoNRY+1icB5sEsF0jhi0RJ58tMFwYSIEYPVEAYriMwcQQf6kdTvmTRrMr4tr/+R jAtp+h0EOGqh6EtZX2V/jcFMrg3wYBYuUGP5gmJSTLk9XT4n0mdSAYm1ir5/RtGzMRvH PokF5dSbHCOzzq9+Tw6ouXFE0i0hHBbnKAuAQuE7cPIlHgwgtGy6Z4DEYZniOicYRwBu FyqpwI7ipmWr6cNOnfL1gAGGNnDqCVudcdQrHdN1euUmVEz36s+M6AkLxWKRAp6cqdS3 OFrKGfhCFTxKwZldUhWsNXfoPf0eIYj5MKM+/ipamCQhg1rx30l+xwTVhFCykHOsT6d1 XwXg== X-Gm-Message-State: ACgBeo0H6s6lGG0l+N8QvJh/lHAQdsx7oJyOngQvyRgz3qJ1MYzevCb+ dOYbpIlrCaOR7pofgfoWWgofLkMjmIvhqCBAI0BrZFU3BMK6S6izJqD2MFcVVb7+SYzUJz0ti5u 3zLasM02WgnXeZR3OdwAu7AMXRxyTIhy1+HMUt/K2K/umDyCuTVT+A53jk910ekT4GbGjbesjDY 4M X-Received: from jiangzp-glinux-dev.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:4c52]) (user=jiangzp job=sendgmr) by 2002:a17:90b:a14:b0:1fa:bc6e:e5e8 with SMTP id gg20-20020a17090b0a1400b001fabc6ee5e8mr125775pjb.1.1661229877885; Mon, 22 Aug 2022 21:44:37 -0700 (PDT) Date: Mon, 22 Aug 2022 21:44:33 -0700 Message-Id: <20220823044434.3402413-1-jiangzp@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.37.1.595.g718a3a8f04-goog Subject: [kernel PATCH v2 0/1] Bluetooth: hci_sync: hold hdev->lock when cleanup hci_conn From: Zhengping Jiang To: linux-bluetooth@vger.kernel.org, marcel@holtmann.org Cc: chromeos-bluetooth-upstreaming@chromium.org, Zhengping Jiang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Johan Hedberg , Luiz Augusto von Dentz , Paolo Abeni , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 Hold hdev->lock for hci_conn_failed. There are possible race conditions which may cause kernel crash. Changes in v2: - Update commit message Changes in v1: - Hold hdev->lock for hci_conn_failed Zhengping Jiang (1): Bluetooth: hci_sync: hold hdev->lock when cleanup hci_conn net/bluetooth/hci_sync.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.37.1.595.g718a3a8f04-goog