Message ID | 20221104054915.920808490@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 l7csp190709wru; Thu, 3 Nov 2022 22:50:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4N23/RsALCE44lQLwbGIubbquBGrMGtjBytmRCK/t4uh7VB8ed4nZYDhDThhF5wAh/yszy X-Received: by 2002:a17:907:da5:b0:7ad:7e95:6513 with SMTP id go37-20020a1709070da500b007ad7e956513mr33736688ejc.442.1667541052814; Thu, 03 Nov 2022 22:50:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667541052; cv=none; d=google.com; s=arc-20160816; b=EiUYsqx7uRhcd33AeuN/xjSfHDIQ5MxYSb0iVZyXkKYJrD+LWKtsY4Dwr+hr9T3RUr DiWYbDvBxoWeWC8rrxDd9GAGgWmkZ1VFj+8f3bnTeDQOMX0AiklH2zWz1BWB1t08uecT 6r7xQgaNVilYm3SijXAxO2wfAl2imfWokp/gKTek0y2+k/QptQVVrv2dvXO+fQ7lbzA3 CkRTbRa5Si4md5kTzOKdCG0Kyds71iqx9EgCpw8YRP7mgwzYEQ4q7LqPek54Ye6OllDZ BUSccs6NKqF2XS2Rra0zL30RXS2+IeehqvU56zf4PxDvIeLub6C8728Z4LBi3BnPV6JK vkDw== 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=59qOdfmDsBXIl7+eDWBhmGviLWoRBArZUBCIYlDSf5w=; b=oQsBvRMJiMyaRPHCDkLkppkQoLvmBT1r5ak88itg5Fq/okn6yaGOmHtKX2iHlVQzKZ OZRWP691RrxRLT2S1HRkaIymTbSrFekmeGftAb08iC7GwRMRGA3ytc48olbqZs2vacZE Ki4QhtPAPmtBxUJXwA9F2Gdw7Y6Kllhfl+p4nA0D/8/FmHKYKeyl6e6izuHFaJzE9KQ5 MWXSxO76xWw0a5gHutvW+3l22+TMbwoiMRtKaqBuurhDWxFnvwZ1i5P8eCnB4IFlx4Rt rqLD/2hwn1OvABDbP9EVCKZGTAKKaYN2Ak8SZxF4uVXlRcftDszQSNR9SZvrDalbCzXw ZHXQ== 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 rp20-20020a170906d97400b0078db6f5f4b2si3034119ejb.546.2022.11.03.22.50.29; Thu, 03 Nov 2022 22:50:52 -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 S231580AbiKDFtp (ORCPT <rfc822;jimliu8233@gmail.com> + 99 others); Fri, 4 Nov 2022 01:49:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231334AbiKDFsx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 4 Nov 2022 01:48:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79B4027B1E for <linux-kernel@vger.kernel.org>; Thu, 3 Nov 2022 22:48:52 -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 A3A68620C5 for <linux-kernel@vger.kernel.org>; Fri, 4 Nov 2022 05:48:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FC75C43148; Fri, 4 Nov 2022 05:48:49 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from <rostedt@goodmis.org>) id 1oqpZs-0071A9-0G; Fri, 04 Nov 2022 01:49:16 -0400 Message-ID: <20221104054915.920808490@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 04 Nov 2022 01:41:15 -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>, Tejun Heo <tj@kernel.org>, Lai Jiangshan <jiangshanlai@gmail.com> Subject: [RFC][PATCH v3 22/33] timers: workqueue: Use timer_shutdown_sync() before freeing timer References: <20221104054053.431922658@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?1748543526841704981?= X-GMAIL-MSGID: =?utf-8?q?1748543526841704981?= |
Series |
timers: Use timer_shutdown*() before freeing timers
|
|
Commit Message
Steven Rostedt
Nov. 4, 2022, 5:41 a.m. UTC
From: "Steven Rostedt (Google)" <rostedt@goodmis.org> Before a timer is freed, timer_shutdown_sync() must be called. Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.home/ Cc: Tejun Heo <tj@kernel.org> Cc: Lai Jiangshan <jiangshanlai@gmail.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> --- kernel/workqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 7cd5f5e7e0a1..2bbea15be4c8 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -3608,8 +3608,8 @@ static void put_unbound_pool(struct worker_pool *pool) wait_for_completion(pool->detach_completion); /* shut down the timers */ - del_timer_sync(&pool->idle_timer); - del_timer_sync(&pool->mayday_timer); + timer_shutdown_sync(&pool->idle_timer); + timer_shutdown_sync(&pool->mayday_timer); /* RCU protected to allow dereferences from get_work_pool() */ call_rcu(&pool->rcu, rcu_free_pool);