From patchwork Fri Nov 4 05:41:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 15346 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp190607wru; Thu, 3 Nov 2022 22:50:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4d0cOn5hQEj0h6vm7Ms5iDaFByTEVAcgF1pdittY4CruPrymitNnuNMRMfVbJfr+SOAanR X-Received: by 2002:a17:906:9253:b0:7ae:5a6:22f8 with SMTP id c19-20020a170906925300b007ae05a622f8mr12126911ejx.108.1667541032024; Thu, 03 Nov 2022 22:50:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667541032; cv=none; d=google.com; s=arc-20160816; b=u96MHP4SQEsLH6UCtvHNYOZN4yFRhdqEntUqLhU5nZ2I+wsVXGP3Zu0Mw0dzLRPDMW bnWBZS1kfZa3Ns6+OZ3o3Ij9KXEjrZhenyEzEmLSpvKM2oHcI8SdkMaAPsFIgzNt4BVs bLgItkK52yjiLKP7CWeqhzgy1a+1xiJPYD9ffmulchPP+YnVOOmQpDVd7DPBtiAc1LnB ZTivb8ZMB6NEljgBhvDEst6MPyoiDHBvDWNGxPx4/RgfQgIEH4wXJ2uxsufXDDilkW2o GYl8kcO9LU6zCvRdLL915TlDOOR7iCftsGQ3IbVvH9e6tR0ZPxnj+rtBQTYShyEr4wP7 qA1Q== 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=DdIcQHc8LLpevj1C4ETSUQALUijstLkYnqMsvSLmdhs=; b=Km/IZ1S7bMsgFHV6HxKjCQt2507hVyuOKtGY0tUT7rV0JZDB/YBgM+EaQ0QxxSd/72 y1Izsz+H4dxE2qk8noOUFtVERjf68NDftqj+5QannCiB2A2qgPGCN9lpdXAEQ3JOmsFm g6VosbWyeYS7agPkK408fRxeeSarIPm4M+KgkbzXhNOJENwqf3oZ6dsxT45x981bzrXe /sELNFNCdY69pmD3log1RftaGCwbPr9i6FP1NuIysWUlLUNk1djaJeMDEey7wDpVKBJT ligNGqSjAVv+/lk7zIvmRr4nTLpsay7h8HV7uS4rA5tD8nnNyZkQ3jJ0pqffS7SGMeww gIGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x14-20020a056402414e00b0045d4f99616dsi3748735eda.456.2022.11.03.22.50.07; Thu, 03 Nov 2022 22:50:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231446AbiKDFt2 (ORCPT + 99 others); Fri, 4 Nov 2022 01:49:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230511AbiKDFsw (ORCPT ); Fri, 4 Nov 2022 01:48:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9706248D8; Thu, 3 Nov 2022 22:48:50 -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 BD597620C0; Fri, 4 Nov 2022 05:48:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC804C4314D; Fri, 4 Nov 2022 05:48:46 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1oqpZp-00712D-1g; Fri, 04 Nov 2022 01:49:13 -0400 Message-ID: <20221104054913.358784408@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 04 Nov 2022 01:41:01 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org Subject: [RFC][PATCH v3 08/33] timers: Bluetooth: Use timer_shutdown_sync() before freeing timer References: <20221104054053.431922658@goodmis.org> MIME-Version: 1.0 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748543505210646271?= X-GMAIL-MSGID: =?utf-8?q?1748543505210646271?= From: "Steven Rostedt (Google)" Before a timer is freed, timer_shutdown_sync() 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..834b2efaa9bf 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); + timer_shutdown_sync(&bcsp->tbcsp); hu->priv = NULL; diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c index c5a0409ef84f..51f93ff5ebe8 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); + timer_shutdown_sync(&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..eb81296b284c 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); + timer_shutdown_sync(&qca->tx_idle_timer); + timer_shutdown_sync(&qca->wake_retrans_timer); qca->hu = NULL; kfree_skb(qca->rx_skb);