Message ID | 20221027150926.969147187@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 l7csp287120wru; Thu, 27 Oct 2022 08:11:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4BUlMZG2MFcHARwB1z5X2qi8vGY2udzL18wnD58QMGez115A2JzlHBsgpR641G59eYoqDj X-Received: by 2002:a05:6402:500d:b0:459:3e56:e6f9 with SMTP id p13-20020a056402500d00b004593e56e6f9mr47141033eda.367.1666883511911; Thu, 27 Oct 2022 08:11:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666883511; cv=none; d=google.com; s=arc-20160816; b=QHXDfCNl4+eD/uRnr7TzI5lGZa6z0KvIt7NJB55ETjQyovf0NOD6k7gI4eq30/PBQQ vQpvwMUqNkZrxZqVTnf4BhNRDANpMR05AMP4IET/styv3AC2x7spG6SFTf+WQhMiRdOD ZPlr/jx3pA2uhF7/5q22Ceton4PMN0+h+gxP2v0VRui5AHYtI6FGup2gmROWY6weT+Yh OE6vuNzb5KDXXAjcdGET9yNTGX42ndeUY2l5NoiJ/7fIW7gRFyx/DmjlDAPCwtjjJcpM bVhMC/Mv6jBabYneszf141wAMbGPnRPuko0dZoF2EtwmNQPl21XLAp+RzC0P+SSpSg1t oxDg== 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=R9/dyHU0ttQhAMauVjiics3a+M2cPLLX5UeGSlLMrCo=; b=ord9m2FEwp5urGcGxxxu/YEN4MJqoztrZSXbxC5Ovg6jDXbc9Uhx5V6LQ+7u+X+PY1 ttwoKDSfcZkQORxV68A6p+bXCyU+S4p9J69OE7aTSaRJxsejZ5XSm546RMjYlG6hMIbm M338lUy6TlcDoaCRV96ajP2sHrLef8AqWAPNg3p8M1aYEZAFpbpu2PyoFkeSe7LWS2Wz 4V85d5wrowgXrGffhSHsdqjRmSwiasPhy3Yo0sl0xrliIruD95hHgzrIfvILBhzacMxQ grcfHf9/2MvGb0WmkBAf5EUoDtN/BHmN/qpeRjrNNRQQ8XFEfVFnPXkfuGNrGhzaFSAg 3PxA== 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 ne19-20020a1709077b9300b0078dcaaa2638si1736968ejc.708.2022.10.27.08.11.27; Thu, 27 Oct 2022 08:11:51 -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 S236425AbiJ0PKj (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Thu, 27 Oct 2022 11:10:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236072AbiJ0PJR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Oct 2022 11:09:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8114618F27E for <linux-kernel@vger.kernel.org>; Thu, 27 Oct 2022 08:09:14 -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 ams.source.kernel.org (Postfix) with ESMTPS id 3E0C1B826AF for <linux-kernel@vger.kernel.org>; Thu, 27 Oct 2022 15:09:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC0A3C4347C; Thu, 27 Oct 2022 15:09:11 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from <rostedt@goodmis.org>) id 1oo4Vb-00BvX8-0S; Thu, 27 Oct 2022 11:09:27 -0400 Message-ID: <20221027150926.969147187@goodmis.org> User-Agent: quilt/0.66 Date: Thu, 27 Oct 2022 11:05:35 -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>, Corey Minyard <minyard@acm.org>, openipmi-developer@lists.sourceforge.net Subject: [RFC][PATCH v2 10/31] timers: ipmi: Use del_timer_shutdown() before freeing timer References: <20221027150525.753064657@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?1747854045809973514?= X-GMAIL-MSGID: =?utf-8?q?1747854045809973514?= |
Series |
timers: Use del_timer_shutdown() before freeing timers
|
|
Commit Message
Steven Rostedt
Oct. 27, 2022, 3:05 p.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org> Before a timer is freed, del_timer_shutdown() must be called. Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home/ Cc: Corey Minyard <minyard@acm.org> Cc: openipmi-developer@lists.sourceforge.net Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> --- drivers/char/ipmi/ipmi_msghandler.c | 2 +- drivers/char/ipmi/ipmi_ssif.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
Comments
On Thu, Oct 27, 2022 at 11:05:35AM -0400, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" <rostedt@goodmis.org> > > Before a timer is freed, del_timer_shutdown() must be called. Thanks, this is in my queue, or: Acked-by: Corey Minyard <cminyard@mvista.com> if you prefer that. -corey > > Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home/ > > Cc: Corey Minyard <minyard@acm.org> > Cc: openipmi-developer@lists.sourceforge.net > Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> > --- > drivers/char/ipmi/ipmi_msghandler.c | 2 +- > drivers/char/ipmi/ipmi_ssif.c | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c > index 49a1707693c9..b577f66f3ca6 100644 > --- a/drivers/char/ipmi/ipmi_msghandler.c > +++ b/drivers/char/ipmi/ipmi_msghandler.c > @@ -5540,7 +5540,7 @@ static void __exit cleanup_ipmi(void) > * here. > */ > atomic_set(&stop_operation, 1); > - del_timer_sync(&ipmi_timer); > + del_timer_shutdown(&ipmi_timer); > > initialized = false; > > diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c > index e1072809fe31..bb4df879a5ab 100644 > --- a/drivers/char/ipmi/ipmi_ssif.c > +++ b/drivers/char/ipmi/ipmi_ssif.c > @@ -1273,8 +1273,8 @@ static void shutdown_ssif(void *send_info) > schedule_timeout(1); > > ssif_info->stopping = true; > - del_timer_sync(&ssif_info->watch_timer); > - del_timer_sync(&ssif_info->retry_timer); > + del_timer_shutdown(&ssif_info->watch_timer); > + del_timer_shutdown(&ssif_info->retry_timer); > if (ssif_info->thread) { > complete(&ssif_info->wake_thread); > kthread_stop(ssif_info->thread); > -- > 2.35.1
On Thu, Oct 27, 2022 at 10:20:15AM -0500, Corey Minyard wrote: > On Thu, Oct 27, 2022 at 11:05:35AM -0400, Steven Rostedt wrote: > > From: "Steven Rostedt (Google)" <rostedt@goodmis.org> > > > > Before a timer is freed, del_timer_shutdown() must be called. > > Thanks, this is in my queue, or: > > Acked-by: Corey Minyard <cminyard@mvista.com> > > if you prefer that. Well, del_timer_shutdown() isn't there yet, so I guess the Ack is what you need. -corey > > -corey > > > > > Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home/ > > > > Cc: Corey Minyard <minyard@acm.org> > > Cc: openipmi-developer@lists.sourceforge.net > > Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> > > --- > > drivers/char/ipmi/ipmi_msghandler.c | 2 +- > > drivers/char/ipmi/ipmi_ssif.c | 4 ++-- > > 2 files changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c > > index 49a1707693c9..b577f66f3ca6 100644 > > --- a/drivers/char/ipmi/ipmi_msghandler.c > > +++ b/drivers/char/ipmi/ipmi_msghandler.c > > @@ -5540,7 +5540,7 @@ static void __exit cleanup_ipmi(void) > > * here. > > */ > > atomic_set(&stop_operation, 1); > > - del_timer_sync(&ipmi_timer); > > + del_timer_shutdown(&ipmi_timer); > > > > initialized = false; > > > > diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c > > index e1072809fe31..bb4df879a5ab 100644 > > --- a/drivers/char/ipmi/ipmi_ssif.c > > +++ b/drivers/char/ipmi/ipmi_ssif.c > > @@ -1273,8 +1273,8 @@ static void shutdown_ssif(void *send_info) > > schedule_timeout(1); > > > > ssif_info->stopping = true; > > - del_timer_sync(&ssif_info->watch_timer); > > - del_timer_sync(&ssif_info->retry_timer); > > + del_timer_shutdown(&ssif_info->watch_timer); > > + del_timer_shutdown(&ssif_info->retry_timer); > > if (ssif_info->thread) { > > complete(&ssif_info->wake_thread); > > kthread_stop(ssif_info->thread); > > -- > > 2.35.1
On Thu, 27 Oct 2022 10:22:54 -0500 Corey Minyard <minyard@acm.org> wrote: > Well, del_timer_shutdown() isn't there yet, so I guess the Ack is what > you need. Yep :-) I need Thomas and Linus's OK on that too, hence the RFC. -- Steve
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 49a1707693c9..b577f66f3ca6 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -5540,7 +5540,7 @@ static void __exit cleanup_ipmi(void) * here. */ atomic_set(&stop_operation, 1); - del_timer_sync(&ipmi_timer); + del_timer_shutdown(&ipmi_timer); initialized = false; diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index e1072809fe31..bb4df879a5ab 100644 --- a/drivers/char/ipmi/ipmi_ssif.c +++ b/drivers/char/ipmi/ipmi_ssif.c @@ -1273,8 +1273,8 @@ static void shutdown_ssif(void *send_info) schedule_timeout(1); ssif_info->stopping = true; - del_timer_sync(&ssif_info->watch_timer); - del_timer_sync(&ssif_info->retry_timer); + del_timer_shutdown(&ssif_info->watch_timer); + del_timer_shutdown(&ssif_info->retry_timer); if (ssif_info->thread) { complete(&ssif_info->wake_thread); kthread_stop(ssif_info->thread);