Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp842467rwi; Thu, 27 Oct 2022 08:10:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7n7daS5Kj7Buo5rEjPijZg6u/LXKws+MO8mrD4KIPIKZd6aPxEpTY07iA707g/TPoT5HWg X-Received: by 2002:a50:ed82:0:b0:461:ab45:df1a with SMTP id h2-20020a50ed82000000b00461ab45df1amr22034481edr.295.1666883432504; Thu, 27 Oct 2022 08:10:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666883432; cv=none; d=google.com; s=arc-20160816; b=EO/kzhy5U0KDqxP75ZaKuDrI9Mrc6ZeAyVjUDDDEd1s5kbiwq+QKAsTmiTYNxHTp8+ bW7p+2IguXUqoR54ntCrDsDB47QINU/nMZi5EOSAVotwow+CZX1ZLxwMFVENWPBwVbi0 irmmcqNeLKIdee/oasVXed1/VCpeBpRs6FivXglptpH5ilyQZxarLI/FSD4CfYPfmw3Y b9S3wAhn2NqgcRE4RJ46/056Wx28ycl8ya1HcOX2Dy7wZ0KhbYAMnLhXmqCNhyThcYIv ScO0wRUJhTTKnFLZ42hRgLKwMEiLeluiNHuzyyeIZcWKjUNx/HZ2KpNaht5kVoSEYSaN Fs0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id; bh=dwbk4ip1Y97M92+SVR+/StU9XSOK8x7PmLHV5xAygd8=; b=hTj1uGjjhcOY4RHczbX5vB+Fp9s3pCJUxv4WjWPGhVFxzKo1ktQZF5BOYgftwLngPa G2K6Ftofw6WiL402H9bjv8w8WcRiNLHNHDSCJbGJwn2TwHW2Ja42Z1gUXA+dbTnN0SD9 6F2x5gCYh1ovuscWFrtDePBPj5Gn3HjiGV8e8hyGNzzNqVYCCn7eLhSZBwoA8NkeLfJw bAAm4+QikkP7V2C9kuJxgLzEP6gXWiBALCHL0MEkH9U0psZR/NC/bQUkB1jURoWRSXZo ph7KgkuFCIytoOgh+7EMxGBvFgdzKaBcc/jYPOtL20q8RRahYg1N5vhdtjb2yRh4o1eI ynIA== 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:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sh10-20020a1709076e8a00b007a39ad3da43si1572679ejc.714.2022.10.27.08.09.56; Thu, 27 Oct 2022 08:10:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236212AbiJ0PJW (ORCPT + 99 others); Thu, 27 Oct 2022 11:09:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236247AbiJ0PJO (ORCPT ); Thu, 27 Oct 2022 11:09:14 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 367DE18F0D9; Thu, 27 Oct 2022 08:09:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1E706623A4; Thu, 27 Oct 2022 15:09:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D0FFC43148; Thu, 27 Oct 2022 15:09:11 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1oo4Va-00BvW0-2R; Thu, 27 Oct 2022 11:09:26 -0400 Message-ID: <20221027150926.587581591@goodmis.org> User-Agent: quilt/0.66 Date: Thu, 27 Oct 2022 11:05:33 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org Subject: [RFC][PATCH v2 08/31] timers: Bluetooth: Use del_timer_shutdown() before freeing timer References: <20221027150525.753064657@goodmis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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: "Steven Rostedt (Google)" Before a timer is freed, del_timer_shutdown() must be called. Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home/ Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Luiz Augusto von Dentz Cc: linux-bluetooth@vger.kernel.org Signed-off-by: Steven Rostedt (Google) --- drivers/bluetooth/hci_bcsp.c | 2 +- drivers/bluetooth/hci_h5.c | 2 +- drivers/bluetooth/hci_qca.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/bluetooth/hci_bcsp.c b/drivers/bluetooth/hci_bcsp.c index cf4a56095817..69caaff37141 100644 --- a/drivers/bluetooth/hci_bcsp.c +++ b/drivers/bluetooth/hci_bcsp.c @@ -737,7 +737,7 @@ static int bcsp_close(struct hci_uart *hu) { struct bcsp_struct *bcsp = hu->priv; - del_timer_sync(&bcsp->tbcsp); + del_timer_shutdown(&bcsp->tbcsp); hu->priv = NULL; diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c index c5a0409ef84f..08a36ea9eea9 100644 --- a/drivers/bluetooth/hci_h5.c +++ b/drivers/bluetooth/hci_h5.c @@ -253,7 +253,7 @@ static int h5_close(struct hci_uart *hu) { struct h5 *h5 = hu->priv; - del_timer_sync(&h5->timer); + del_timer_shutdown(&h5->timer); skb_queue_purge(&h5->unack); skb_queue_purge(&h5->rel); diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 8df11016fd51..1796166ba35d 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -697,8 +697,8 @@ static int qca_close(struct hci_uart *hu) skb_queue_purge(&qca->txq); skb_queue_purge(&qca->rx_memdump_q); destroy_workqueue(qca->workqueue); - del_timer_sync(&qca->tx_idle_timer); - del_timer_sync(&qca->wake_retrans_timer); + del_timer_shutdown(&qca->tx_idle_timer); + del_timer_shutdown(&qca->wake_retrans_timer); qca->hu = NULL; kfree_skb(qca->rx_skb); -- 2.35.1