From patchwork Fri Nov 4 05:41:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 15360 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp191144wru; Thu, 3 Nov 2022 22:52:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM77kgXmn4g/FLYaWfIGuRXmm8K+VtdMJB1ZO31n7TOqpnWxg2sqkc/ne5sGGa5+pGvPT/2k X-Received: by 2002:a17:906:c44:b0:7ae:749:1659 with SMTP id t4-20020a1709060c4400b007ae07491659mr11477905ejf.759.1667541131679; Thu, 03 Nov 2022 22:52:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667541131; cv=none; d=google.com; s=arc-20160816; b=s1ZvMlYlsE3r4HQOUVSPADuJkdFs+dLYDWRe90FKOf6Chc1HKIR1u/BEe7uRtskama cgqL+Q23QFyWaVwgH/WctfSD9hHkuXXvN38qIqJUfETckhptKKhuEFBoAzVJ0plzR5gi IAsc7PS+lKHjsRhxfGEm3+sIyE1kCpr3ZBNGnYq/yTKL/pf1u67Av4KvxnVsLh514Pgl TAxCfsMnHXIShW/urAJkq4FtyyjqsCbap1L18OdkLE7M6JeDP/bHvdu+JPCLyleAIvGj 68hJ3XK3K3ACHuW+GBxCwOKEbetKbO06BdwH1l/mGDLh7+I4beBmBM7RFLDPO4+A1CP+ e9/w== 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=DdmgUfPeyMg7CytFaflJ94lL126TQ0ZrdI5ezOrhjq8=; b=J88RyIPpstPYj/FKmNL0T5kMTNpqt3cqwg4HQafWdXiZs4gb3B3HF4mg5qwPXbJCCn hUYG8y6obSvXDWJi6lMiWB34CUvkj20Yik2l8UqFBMrIJ8YiWLJ7/QkSkb1DWjOt5fyh 5NvGA4WC5eynJKgeQCoTm6Gwmk+LF+DDepxephjIW7W09MRL5HHE/hSefwFKFv8CkBZz 9UI0MowO3DFARpSFEqmlw5LyoWe63FeqcOct5DK0s6G6iu6DvOViAHGrZzB4K0D/oMjw KPPp9dmss+5dyBCi2IRyV60isRJZvxJUMMHO9KvkfOStI/Ixa8Ex1vw7sD+7V9eVk2E0 l4Sw== 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 cq6-20020a056402220600b004573c1ae3fasi3185044edb.285.2022.11.03.22.51.48; Thu, 03 Nov 2022 22:52:11 -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 S231636AbiKDFtd (ORCPT + 99 others); Fri, 4 Nov 2022 01:49:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231244AbiKDFsw (ORCPT ); Fri, 4 Nov 2022 01:48:52 -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 BAE912792B for ; 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 AA8CF620B7 for ; Fri, 4 Nov 2022 05:48:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86E7CC433B5; 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-00713M-2q; Fri, 04 Nov 2022 01:49:13 -0400 Message-ID: <20221104054913.715976693@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 04 Nov 2022 01:41:03 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton , openipmi-developer@lists.sourceforge.net, Corey Minyard Subject: [RFC][PATCH v3 10/33] timers: ipmi: 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?1748543609475916505?= X-GMAIL-MSGID: =?utf-8?q?1748543609475916505?= 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: openipmi-developer@lists.sourceforge.net Acked-by: Corey Minyard Signed-off-by: Steven Rostedt (Google) --- 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..5cfb85e22d65 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); + timer_shutdown_sync(&ipmi_timer); initialized = false; diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c index e1072809fe31..5194be6d0639 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); + timer_shutdown_sync(&ssif_info->watch_timer); + timer_shutdown_sync(&ssif_info->retry_timer); if (ssif_info->thread) { complete(&ssif_info->wake_thread); kthread_stop(ssif_info->thread);