From patchwork Fri Nov 4 05:41:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 15347 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp190683wru; Thu, 3 Nov 2022 22:50:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM64XmOfhEJOECdF+Ha/oplWHFINi8ewfAtBHrP2rrYeuaOak6b0q+2DuQbeb2cPO57WpfwL X-Received: by 2002:aa7:c792:0:b0:453:98b7:213c with SMTP id n18-20020aa7c792000000b0045398b7213cmr33768187eds.159.1667541047107; Thu, 03 Nov 2022 22:50:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667541047; cv=none; d=google.com; s=arc-20160816; b=qO9t2ECSfEqISkP4C57BScNNfF4KeehL38uN5rG/Tjfv8qKzWwgE9NqXsinhG02cwJ UEmL7BvVvw1MLK29w6hOgGKGp4iMwV3UZJKLb2bSs+uoi62El/f4LgzrXo6vipdxspTZ veRvagsZ/vjomDEU2nOUXt8MAaIIWh7vdUp8Ks/LbXxaOpZN6yjWfl/tRQxNZsiXuO6X k6BmMyI/V9uPx1j0FG0K/IixSnRWIA5LoNkffp4vQWL896az8pPlhwZ/hA/hSP2MJzJw JkDzzQ4PalMlFOErgpSbtLUYDrnLXnRIQMW4O7QK4LKBeTJs5Tj2Ng//k1LGntlehRAe sTqQ== 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=/rrB5AZo+xe29GB6bFMagGr7OU99p1/f4RfK2bxWtNA=; b=kq6n1ymXwiOlo+uIsS0oH3cYQowho3/bxvnXC+XbQ+YGGGDPue/W5EcVLfdvFtJZbD chVYLqrEmzPkcwCKHhtj9D2SuLEagA8eJEJFI8hAj8U4THho3SQobVsF1ffPhNxW5fPy BT+5lblnrGmYsr5qAD4Oi4MuY1TIVO42VJpRkrw26VsJIT0kSC5cEw3kjSUmD117HP2T S281qKcn9HIzzLEk5+GfoK/UHxRMA/BCb90XwKNZ52S2+zX93ySrvpUcF3JadggF2M6Y Jd+tLCpfjGkpJATa4jgFx/JRpiiYoB8dJjnzyCsd+7x53qDrY0rQFyX5ZntFbDNe2Chf Mipw== 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 qb24-20020a1709077e9800b007826e727aeasi3904640ejc.44.2022.11.03.22.50.23; Thu, 03 Nov 2022 22:50:47 -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 S231650AbiKDFtl (ORCPT + 99 others); Fri, 4 Nov 2022 01:49:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231304AbiKDFsx (ORCPT ); Fri, 4 Nov 2022 01:48:53 -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 EF66D28724; 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 326AE620C6; Fri, 4 Nov 2022 05:48:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BC21C43145; Fri, 4 Nov 2022 05:48:48 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1oqpZq-00715d-21; Fri, 04 Nov 2022 01:49:14 -0400 Message-ID: <20221104054914.458495869@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 04 Nov 2022 01:41:07 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton , David Rheinsberg , Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org Subject: [RFC][PATCH v3 14/33] timers: HID: 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?1748543520727327462?= X-GMAIL-MSGID: =?utf-8?q?1748543520727327462?= 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: David Rheinsberg Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Signed-off-by: Steven Rostedt (Google) --- drivers/hid/hid-wiimote-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c index 4399d6c6afef..2c94308dda3c 100644 --- a/drivers/hid/hid-wiimote-core.c +++ b/drivers/hid/hid-wiimote-core.c @@ -1764,7 +1764,7 @@ static void wiimote_destroy(struct wiimote_data *wdata) spin_unlock_irqrestore(&wdata->state.lock, flags); cancel_work_sync(&wdata->init_worker); - del_timer_sync(&wdata->timer); + timer_shutdown_sync(&wdata->timer); device_remove_file(&wdata->hdev->dev, &dev_attr_devtype); device_remove_file(&wdata->hdev->dev, &dev_attr_extension);