[v4a,35/38] timers: hangcheck: Use timer_shutdown_sync() before a module is released
Message ID | 20221105060201.271193974@goodmis.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp830181wru; Fri, 4 Nov 2022 23:05:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ODXev0BZLw5pLW71JiJ32QlYSIosIa95Apc/LVejslRdyghHkjQF0Mjq8S+UQTxBfWlEw X-Received: by 2002:a17:90a:db93:b0:214:1671:a106 with SMTP id h19-20020a17090adb9300b002141671a106mr22027603pjv.4.1667628332670; Fri, 04 Nov 2022 23:05:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667628332; cv=none; d=google.com; s=arc-20160816; b=bGMGBaRbQLSb325cIlJJZ/vTR+I43+8aNbWhn8vbp44O3iMj/rUVDgNBXSeDstjJ8m F4ZjJlKw24mDCryfpJOW20wSl73RwhcLUZSFBfO9/bTkM71kukAScMxELO6hYx/IhYbF OX2JNdyplCbjERhuS1SWqyAsRS5rs4kmFgopw/EKnCJp+G9ycwnW48tVrBhBRXPEiKi8 l2ZJFKL1OTbayPyzCDpYkPoLfHVHTUgigsMU9YTKLyrFrpZMQRQHiY17aXNipTzkQOs3 dCaNY1UZ57MJz2vYVvlyKlqFbgx18kUj8Usi5NUq4lOk0iuqiAcN2/p88m1abTqhY10+ TFxA== 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=641fSrXeKQzwCLK9CRNXhH5sQ3Ib+Z9TYyeZXKqnHvw=; b=0pybzSrAieZb/W8hac5HPoFd7B2hM6ITxtVk4dB70oVBd5NQn2Q8o84Q0IlYCoOZTk VkMjqUNmadvYvST5+zc0voIDrOrUo8G8MxxPInA9/L8KqSPQsxixp3rmZWg40BG59GIB cXtfLpmTsMLEIGZ74mP7m+q1qFKIJvC5yez5MrpHtzCYOofn6Cumyh16hCPXsObNELY9 hfyTMhQFWJ7+2X2IrSwYm0sjQNzw0Di0HOH2xD3saLIvI7HcAua6lxkMszOc7B5hf4YN ZlizlFWSY56PVxORyD0Tm2OCDZ/bdZ5wV0UK5HfH7SXsbxDU3krILbbRiqt54uwzjVmK XTxA== 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 d11-20020a170902cecb00b00180a7ff784csi2268374plg.360.2022.11.04.23.05.20; Fri, 04 Nov 2022 23:05: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 S229537AbiKEGDP (ORCPT <rfc822;hjfbswb@gmail.com> + 99 others); Sat, 5 Nov 2022 02:03:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229665AbiKEGBf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 5 Nov 2022 02:01:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DFDB3123B for <linux-kernel@vger.kernel.org>; Fri, 4 Nov 2022 23:01:33 -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 5FF0060A67 for <linux-kernel@vger.kernel.org>; Sat, 5 Nov 2022 06:01:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AD9DC433D6; Sat, 5 Nov 2022 06:01:33 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from <rostedt@goodmis.org>) id 1orCFl-007Oya-1Q; Sat, 05 Nov 2022 02:02:01 -0400 Message-ID: <20221105060201.271193974@goodmis.org> User-Agent: quilt/0.66 Date: Sat, 05 Nov 2022 02:00:59 -0400 From: Steven Rostedt <rostedt@goodmis.org> To: linux-kernel@vger.kernel.org Cc: Linus Torvalds <torvalds@linux-foundation.org>, Thomas Gleixner <tglx@linutronix.de>, Stephen Boyd <sboyd@kernel.org>, Guenter Roeck <linux@roeck-us.net>, Anna-Maria Gleixner <anna-maria@linutronix.de>, Andrew Morton <akpm@linux-foundation.org>, Arnd Bergmann <arnd@arndb.de>, Greg Kroah-Hartman <gregkh@linuxfoundation.org> Subject: [PATCH v4a 35/38] timers: hangcheck: Use timer_shutdown_sync() before a module is released References: <20221105060024.598488967@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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748635046750166846?= X-GMAIL-MSGID: =?utf-8?q?1748635046750166846?= |
Series |
timers: Use timer_shutdown*() before freeing timers
|
|
Commit Message
Steven Rostedt
Nov. 5, 2022, 6 a.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org> Before a module is released, timer_shutdown_sync() must be called on its timers. Also fixed some whitespace issues in the line after. Link: https://lore.kernel.org/all/20221104054053.431922658@goodmis.org/ Cc: Arnd Bergmann <arnd@arndb.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> --- 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);