From nobody Wed Apr 8 17:27:22 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F024ECAAA1 for ; Thu, 27 Oct 2022 15:10:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236454AbiJ0PKt (ORCPT ); Thu, 27 Oct 2022 11:10:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236070AbiJ0PJR (ORCPT ); Thu, 27 Oct 2022 11:09:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 952F318F90B for ; 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 dfw.source.kernel.org (Postfix) with ESMTPS id 758FA623A3 for ; Thu, 27 Oct 2022 15:09:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50A2CC4314D; Thu, 27 Oct 2022 15:09:14 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1oo4Vd-00Bvdu-1k; Thu, 27 Oct 2022 11:09:29 -0400 Message-ID: <20221027150929.370900127@goodmis.org> User-Agent: quilt/0.66 Date: Thu, 27 Oct 2022 11:05:47 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Tejun Heo , Lai Jiangshan Subject: [RFC][PATCH v2 22/31] timers: workqueue: Use del_timer_shutdown() before freeing timer References: <20221027150525.753064657@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Steven Rostedt (Google)" Before a timer is freed, del_timer_shutdown() must be called. Link: https://lore.kernel.org/all/20220407161745.7d6754b3@gandalf.local.hom= e/ Cc: Tejun Heo Cc: Lai Jiangshan Signed-off-by: Steven Rostedt (Google) --- kernel/workqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 7cd5f5e7e0a1..47a7124bbea4 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); =20 /* shut down the timers */ - del_timer_sync(&pool->idle_timer); - del_timer_sync(&pool->mayday_timer); + del_timer_shutdown(&pool->idle_timer); + del_timer_shutdown(&pool->mayday_timer); =20 /* RCU protected to allow dereferences from get_work_pool() */ call_rcu(&pool->rcu, rcu_free_pool); --=20 2.35.1