From patchwork Thu Oct 27 15:05:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 11826 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp286639wru; Thu, 27 Oct 2022 08:11:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM79BFyctqFHo+9s8ydKrrNQP2EYKScKIFo86kDBzGuL29ZHct8cpC6I5/npfNMuGcPW8aSL X-Received: by 2002:a17:907:744:b0:741:36b9:d2cc with SMTP id xc4-20020a170907074400b0074136b9d2ccmr41042031ejb.613.1666883465483; Thu, 27 Oct 2022 08:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666883465; cv=none; d=google.com; s=arc-20160816; b=ULt1p1LRTkhFDcwSeMleF6RxK/6gre2HwgW9reRqCB9S4h/9nhLT1/v89dIAEO7AEb K6CRVfeeKBzx3lKkpOY0e8bTznga9lwfl/sH7U0xiWQmtTrg239gqiMSATc7nJYf3/L5 RfhzlxhdqFePFWuvqo8/qog3bWH/2AuLXhgMga8Hfd4GjxoZHVEuI6O92TpTrIbNz8XZ g35ru3OCkvQLItSeTjb9oXU8Fv3u462XOyaXtXOP3o2oMPcKbgjNy/1z0xikSp4Wwate k6MNtxVG4cLVLiNpniKSyXVjkOYR/rNZvow+G3ZLyFqo48Sb8iUJVz8alexz3QaryGl7 K+zw== 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=zFid6gq4STUIfdArzrgperDhMhS36cevOha+2dP34FY=; b=mznGWxGAvDGULV5wN8J6az1l+VZIfo1mNEu0YBP3V0Z1M1cVLkPwCHQ7PTxdmI6ZF6 xtstEpQsB05fglDkvv5r6ACvAoFtx/g6xcqWK6OVzKYhwNcW6be19arnd2An+l74XyGL uWRuYh1DrHqESxLuZg+ujaGzzVvmxApN2BGUieA7KHeGwEeKZWOIH3gka/pI1hNNSz/7 ZD8HWW3z/JEu3QC3qccJQHjxK3sLyTJOIgP9B+Cm1atPH/nZ6LmBvXiRn6ZkGq78/5ha IQ9PaTrX3JTthAo7PyF5GFqNaV5Om27xNXMthBjQM0VflYLXu10ho7FV63QS+LSTxFpS Xj5w== 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 hw19-20020a170907a0d300b007ad79c4f58fsi1146201ejc.120.2022.10.27.08.10.40; Thu, 27 Oct 2022 08:11:05 -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 S236352AbiJ0PJ4 (ORCPT + 99 others); Thu, 27 Oct 2022 11:09:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235863AbiJ0PJO (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 9299418F259; 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 E88C062377; Thu, 27 Oct 2022 15:09:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C44A8C433C1; Thu, 27 Oct 2022 15:09:12 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1oo4Vb-00BvZP-39; Thu, 27 Oct 2022 11:09:27 -0400 Message-ID: <20221027150927.803761506@goodmis.org> User-Agent: quilt/0.66 Date: Thu, 27 Oct 2022 11:05:39 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , David Rheinsberg , Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org Subject: [RFC][PATCH v2 14/31] timers: HID: Use del_timer_shutdown() before freeing timer References: <20221027150525.753064657@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?1747853996459605342?= X-GMAIL-MSGID: =?utf-8?q?1747853996459605342?= 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: 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..d10fa38de297 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); + del_timer_shutdown(&wdata->timer); device_remove_file(&wdata->hdev->dev, &dev_attr_devtype); device_remove_file(&wdata->hdev->dev, &dev_attr_extension);