From patchwork Fri Nov 4 05:41:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 15343 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp190440wru; Thu, 3 Nov 2022 22:49:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5A4fAmA6DERa+2JwjyVTDLNWtZFfutxMKGaCIHKM2dxaSWUt0z1qHjOPkHk5XfTB2KGXjt X-Received: by 2002:a17:906:5a6a:b0:7a6:bad5:8295 with SMTP id my42-20020a1709065a6a00b007a6bad58295mr33092220ejc.647.1667540998518; Thu, 03 Nov 2022 22:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667540998; cv=none; d=google.com; s=arc-20160816; b=Bg3619mef/dK8Rz55iFbQ5noSSJ6aV9MXjaxfjRb1V/gJErYuwDz2oZbkNkMRcTG2X 9sUjznRUlKszZRC87cBzNBhrZT2nSWje0Bl7F8SDiQTqgFkTpwo/lfqXW8qj7ASo/bAi dJdq+CpsTNZ5hEZrRsnqV7t1IfUa0ETj46xOLO/v6PXByw0O7DywbUntYZxv+kcY7VR8 AyHkzOm3RHEBTU0YG6WYQqMgtcbY9L+kH8OgkaZrXwZWAIxKA11iuMQhCoVVGTi2M6bd gFD9MyJHvDbcn9y0qvnh5pfmrQqPJjEqpzMsbzZdHOsn6UbWGOjYeghWyphjb1qkSOh5 uKAw== 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=JbGT3K8Rrs2QG8BxZGG/Qm3iNM+xEfzOcbWWMkbPIew=; b=DpSwddgYDHgKJmOYceaqSlwRE9kLfobBt6+mHXL2RXelSnmplujGlVq07l9U8pU8XD Mnu8jdLVO81BuZ2iYORGlKhtUH6qj2bxAstwjUdKFVugPzTx1PZbTA/BaOzUkS1nbaoK st5pC6muH/X264cmrEqE7H0HgVaV03Q3xgkyOkpGNH7t9xPIarYIwBoTZeK84shTtVT9 WdvdMj4gtzn6AtP+D9g5XyXThVJYMkgszS7atGKqTd0rXAHMHx3yCkbHxgl8pMjTcdS7 ETZg/P3IaMn7qc3IAn1XU07cfEo64b786e0RIimbJk6c2DVGB2fc+yO3A2FHWt9mUlQX +Ejg== 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-20020a170907a0d300b007417e9a2c71si3074139ejc.352.2022.11.03.22.49.35; Thu, 03 Nov 2022 22:49:58 -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 S231555AbiKDFtE (ORCPT + 99 others); Fri, 4 Nov 2022 01:49:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231206AbiKDFsu (ORCPT ); Fri, 4 Nov 2022 01:48:50 -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 E3F3527B31 for ; Thu, 3 Nov 2022 22:48:47 -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 71EBD620BE for ; Fri, 4 Nov 2022 05:48:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 237FBC43151; Fri, 4 Nov 2022 05:48:47 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1oqpZp-00712o-2F; Fri, 04 Nov 2022 01:49:13 -0400 Message-ID: <20221104054913.537193963@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 04 Nov 2022 01:41:02 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton , Arnd Bergmann , Greg Kroah-Hartman Subject: [RFC][PATCH v3 09/33] timers: hangcheck: 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?1748543469930054612?= X-GMAIL-MSGID: =?utf-8?q?1748543469930054612?= From: "Steven Rostedt (Google)" Before a timer is freed, timer_shutdown_sync() must be called. Also fixed some whitespace issues in the line after. Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home/ Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Signed-off-by: Steven Rostedt (Google) --- drivers/char/hangcheck-timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/hangcheck-timer.c b/drivers/char/hangcheck-timer.c index 4181bcc1c796..783a86bfca69 100644 --- a/drivers/char/hangcheck-timer.c +++ b/drivers/char/hangcheck-timer.c @@ -167,8 +167,8 @@ static int __init hangcheck_init(void) static void __exit hangcheck_exit(void) { - del_timer_sync(&hangcheck_ticktock); - printk("Hangcheck: Stopped hangcheck timer.\n"); + timer_shutdown_sync(&hangcheck_ticktock); + printk("Hangcheck: Stopped hangcheck timer.\n"); } module_init(hangcheck_init);