Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3901788rwa; Tue, 23 Aug 2022 12:10:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR46njro4XlXazoby9HBf/ILAXWiPxe4rdMiA4MneHyAg6lLk0mgm2Iu4LFObnxrHyFI4M9O X-Received: by 2002:a63:66c7:0:b0:429:b6fe:903d with SMTP id a190-20020a6366c7000000b00429b6fe903dmr22025626pgc.33.1661281809760; Tue, 23 Aug 2022 12:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661281809; cv=none; d=google.com; s=arc-20160816; b=D4uMotsxof9U/dxnsdtjNqUH4irj2oTqwajJxLivTXDK2Pnf9H6C1V82a/688larMA c+wmtJdZWQQ26y7ge9RCgT2cjNuy6IOKkKIFc1h1TI5TAQ9hmLrVSes9d9GKJDq5Kw3G kjv3yA8dhl5b1z56Fooq71OKZ57o8jQtCuvCOvcKyxBcyIHE5qnTUzANKTg1K7GI2p9n SJg1hcsG+Sh+DPrAW9wErd6xMk7V/unFPmnhq6AvVFLi6VfUMlwpHO4s0wmmlKwGod4N 0ymwVy6HxagVj4UJoFwoAmR0fLZ6RIdMmxHEC+uL9tGV3lz4cjglmfwSFd1GhZAruz3T k5Jg== 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=I6bMwOogiDnVs957h7gTrEm/KH2DteHWZdYaUy0awII=; b=X2M9REYlW46nVlDJkrza6zhib1a2jIOQVU8qsgS5tRyykT55hjjUsaOiDKhjOhW8SW pt3DhekLBpXGm11u/OvV/7w8MmWb7J5bLn3mKEs5MWrXhO33rhdWU49D13Vv9Pk3GWbR 4qTsg4oaVqD6WHwf/WEP45UylXxVGc8dJcLtga7uS9SAPFtS3U7pCGGiVkThSNvZ0ybz iwYvt2zOZpq4q1Vn5nE1yAnEaf5tncI/bwB7+eCa4HdUVsQvb9ORlDRRm1IJfmZd3Stu QYAC4iJlPJNVNndafVuyiQ8M1rkLA9KUtETJkfKVAws73wgcboieLWTngf0X5qk4HGdw vtKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=rdInFjbH; 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 e63-20020a636942000000b0042aff6abae6si1254072pgc.277.2022.08.23.12.09.58; Tue, 23 Aug 2022 12:10:09 -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=rdInFjbH; 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 S229950AbiHWTBl (ORCPT + 99 others); Tue, 23 Aug 2022 15:01:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234307AbiHWTAm (ORCPT ); Tue, 23 Aug 2022 15:00:42 -0400 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EC3BD4BFF for ; Tue, 23 Aug 2022 10:31:37 -0700 (PDT) Received: by mail-pl1-x64a.google.com with SMTP id i16-20020a170902c95000b00172c39b3fb0so7510349pla.22 for ; Tue, 23 Aug 2022 10:31:37 -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=I6bMwOogiDnVs957h7gTrEm/KH2DteHWZdYaUy0awII=; b=rdInFjbHwlhVn7+i3nZ6Y12p5lXLrwsbNkPcgncgA7HvITdYAiDyEnC0kjbOnjkXUP pLYZLdPOWUr0/n6ojM5/Qe4akp/Jf0brbN4tkyI45ztB6F9OfRyuTKzqQs2ffQIBi/VN iHtv0YzIQfsPSgNSpagswtPxKHOJA9+n8O+QNjB0mW1MI3WczSUVwrqvKzwaD1OmxuC5 iOBqYqnIz0BsYXRiy0bICYqW4ntgny9Vm1a648eDXS3+IfghTn9ERmUKQ+h9fE85E3Hb 1OA6joKJtlg/9fI1evThuF8fJehMmbskQrbfvXsqlnAYh1paxIgCQ73PDpqE1/VNfmLF hBXg== 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=I6bMwOogiDnVs957h7gTrEm/KH2DteHWZdYaUy0awII=; b=huk7NN9VhROwlql3wuasQEamu/hwIXKOw7N3sc0lCiHA5kLBR9Ui4GviaVNME5obWs B+9/u0fxOfVdnridjbIgpk5BfLgBjJmshs2KnpKxsI5rs/E0wgGBCim5ncaYs4W/xSYs 6Z/ugQ7lMgAC0Gu2kY+TIfVbMsRxGh0soWSYeGtA6M2u3eTa7BZ/vbB5wO8v1w0yWX8D xPrsaNEXDmp4ZdGKNiDRMhV+753JnAamlMeqz7F9BEgrjomuT2mXPukACZ0dptmQAZi7 RnYUxwvHoY3s1VoFJCbUBDfwTvSehjvqzoeA3jd4cMiQ0vERGMarmU9jdK0QvQO5BMOs pFfw== X-Gm-Message-State: ACgBeo2gXiW3mZ4Bb/OI98GlP/iPfibHtMnTKK/sBzLOHyIyFYTYSq+u NXSrpHU1Sc2/Vvxre1misTjEqQP005jUlrZuVQx4LNOoe9XFKZ53JyKcwZ1lq93ggJv4BOIkL/A BIuIELsc/mPgmlmDwlCwRBmqTaXQHFKthLIdlbOe6jJfixD6FN7j7dP5rAVbgWgCbKxf7GSvF82 zW X-Received: from jiangzp-glinux-dev.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:4c52]) (user=jiangzp job=sendgmr) by 2002:a62:55c3:0:b0:536:729:71d8 with SMTP id j186-20020a6255c3000000b00536072971d8mr22486752pfb.53.1661275692394; Tue, 23 Aug 2022 10:28:12 -0700 (PDT) Date: Tue, 23 Aug 2022 10:28:07 -0700 Message-Id: <20220823172808.3477638-1-jiangzp@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.37.1.595.g718a3a8f04-goog Subject: [kernel PATCH v3 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 v3: - Remove an empty line in commit message between Fixes and SoB 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