Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2867881rwb; Mon, 19 Sep 2022 11:09:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4KU3j6kzgDN5ptjP9oWJ4zPtQ3sBdKf0sBNjud+w94J515r2w1TR4M5K8ADxyxQy4bEpOe X-Received: by 2002:a17:902:ce01:b0:172:59a6:fb3d with SMTP id k1-20020a170902ce0100b0017259a6fb3dmr950372plg.119.1663610975245; Mon, 19 Sep 2022 11:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663610975; cv=none; d=google.com; s=arc-20160816; b=okSUnuViLpXZ0idv2xXZHmXUzbzoqIzEUY7EtYWRcsVA1r1gDpTVD5DBePNgZ2Uabu UNjErVhp7PSFcRpiQs1FY5IckZ+HzYwrxUg9fm0LiqXsauIlDuU9BAGOLjTEGgvlKHp0 wRQoKhJQyxmknBewE78t90bDLTqzWj6KrJa++zQ7iML39P9Iz6/wH31s3X9f1rdvDJWu QantYseRNf3qKOhV5Gvyht2sYIsvcEL5R84eokNb2P7Li3Cifcqvn0BAs8OS7dsyU7WT FtD8I1QayR9Y4PuYW9RzYcdDQDiHFrUnS3MiDviaaTtYYkeN5fZkuL2k1w8j9EMUYpFx 7Xcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=W7vEFLk6QOfSRmXvCpDLpduid5L6BjW+taPCJs38jnI=; b=EeGdr0YmJZ2PQZydlOyz0BkwT0q/xAm5IR27pNNyKzimO8CAZwSMbVIWb+sUfGIBn0 ErpesawrcZIIr/670YgjPMKqa4V2eFo/I9yYbEc+N5KgrW+InZn8S7u5AgEzlFfVdnhw JYGHdffNz23VuqIQ8sMbD5tETYGg/WqEwRtrN1DvdxdfswU79Z8scFsXbESmBD5MLmWB J5pUrVRecxJk9AEm3AmFhqWlQzK7KiIP82soCjdRNqZfJST3UtSj86W/h0qrG7OANtoD H2lmEXdfljLIsNIgR6xBHJv89pZZfRrj6YIZjVE0ONud/5qRPH9ESCnbJLsO6b2kIGVX mLcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LviMVcqr; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r3-20020a635d03000000b00438f7762f93si318682pgb.587.2022.09.19.11.09.22; Mon, 19 Sep 2022 11:09:35 -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=@gmail.com header.s=20210112 header.b=LviMVcqr; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229560AbiISR5G (ORCPT + 99 others); Mon, 19 Sep 2022 13:57:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229929AbiISR5F (ORCPT ); Mon, 19 Sep 2022 13:57:05 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C61C92126A for ; Mon, 19 Sep 2022 10:57:04 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id i15-20020a17090a4b8f00b0020073b4ac27so6867762pjh.3 for ; Mon, 19 Sep 2022 10:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date; bh=W7vEFLk6QOfSRmXvCpDLpduid5L6BjW+taPCJs38jnI=; b=LviMVcqr/wwIaze+cqG6AXrxv1MqWLhNq6oEaT9bZWIx+0I6sLrJgalldIoFjZbFUM 7r+MSYaFENO2Ki1E0H9rXj/FSX3fpXQpBxDNvIMkwGm/mbTyA8rIEt0r3tCGqBtOsnBy b1rTA1kX6Hm7B0k5ln/w2X5wHhK5WmiKm2NEUgUx/OEngyAYpUNEUhxCrTRXL1VkPhn4 Z9EsGMQ1IRG/udWFdwTSyJK6enA6wFc9QT5Fsr5Ps1hkPXlMLJnNU/Bh0/PXGYWAr+PI ZMhQ9EBU1K6g1QkCFOC/HqxKx+R4Fn2CqtsMQfsfCsch3i39WEq55J2f+blEcpbvPvfl Wriw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date; bh=W7vEFLk6QOfSRmXvCpDLpduid5L6BjW+taPCJs38jnI=; b=ytYMWlWkspdI/3FqZowhhacZ9ER62suNEwFTrLqi8JZDzQPPRUNzhmXz8kcJrmhH8Q rLUgcPq0QbSM5yYvC7cnupUUO3gv0ohLqcxa4XWNNc0eW8iiYLcdo6Azhq9CRU5bijWN LYU1liJNMnxCU27Gyv3lbRgQqJkCLlty/VHeP9BUwwwaA8nKh3wRHRw5VM9HdOr2j8Ns a0x1IPcbEiKcnOAMNk4Lz2RWhcyQl8jt7BitFj2tlsAiAou+WPYOwUx9oE7hbFTzccQx 5GEpF6iujYxY6DpLHLsmA5CBVGz1B2Aa2+Cnu+kHKEQv0MjbrJBNkZ/zel3+D4xHbapn E94Q== X-Gm-Message-State: ACrzQf04fJ57C7ToRJo5rpkGnd+zBGZvkoyqfIN0XvCon6AgA+7P0ntI vw4db8R6ALH+iA5Rai1MX8K1zPQhQDo= X-Received: by 2002:a17:90b:3a87:b0:202:d8b7:2c03 with SMTP id om7-20020a17090b3a8700b00202d8b72c03mr32600086pjb.199.1663610223810; Mon, 19 Sep 2022 10:57:03 -0700 (PDT) Received: from lvondent-mobl4.. (c-71-56-157-77.hsd1.or.comcast.net. [71.56.157.77]) by smtp.gmail.com with ESMTPSA id a1-20020aa794a1000000b005361f6a0573sm20579120pfl.44.2022.09.19.10.57.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Sep 2022 10:57:02 -0700 (PDT) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH 2/2] Bluetooth: hci_debugfs: Fix not checking conn->debugfs Date: Mon, 19 Sep 2022 10:57:00 -0700 Message-Id: <20220919175700.1649726-2-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220919175700.1649726-1-luiz.dentz@gmail.com> References: <20220919175700.1649726-1-luiz.dentz@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 From: Luiz Augusto von Dentz hci_debugfs_create_conn shall check if conn->debugfs has already been created and don't attempt to overwrite it. Signed-off-by: Luiz Augusto von Dentz --- net/bluetooth/hci_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/hci_debugfs.c b/net/bluetooth/hci_debugfs.c index 902b40a90b91..3f401ec5bb0c 100644 --- a/net/bluetooth/hci_debugfs.c +++ b/net/bluetooth/hci_debugfs.c @@ -1245,7 +1245,7 @@ void hci_debugfs_create_conn(struct hci_conn *conn) struct hci_dev *hdev = conn->hdev; char name[6]; - if (IS_ERR_OR_NULL(hdev->debugfs)) + if (IS_ERR_OR_NULL(hdev->debugfs) || conn->debugfs) return; snprintf(name, sizeof(name), "%u", conn->handle); -- 2.37.3