From patchwork Fri Nov 4 05:41:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 15350 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp190751wru; Thu, 3 Nov 2022 22:50:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM46HFSZUG4nYniUiZzuD3d2dEaNQRjKLuUWDAS+jxPnBZ5sHMA/GUb8klTCaynXPQa60XLP X-Received: by 2002:a17:907:3f25:b0:7ae:319c:90b2 with SMTP id hq37-20020a1709073f2500b007ae319c90b2mr2039970ejc.515.1667541059314; Thu, 03 Nov 2022 22:50:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667541059; cv=none; d=google.com; s=arc-20160816; b=Hpp1cZYFW+AWBf5BwxnHcDHPCDKYOQbqFsE9SmTdd9jG7LMOzAq8wtLLWSeUnop23D 4njYgVrfFFZCrQuDrS6vnssGu+skjYByd9d05kURljN4Y3M42ZsanKM7gnVlVwbXPB9k gVPEBlUlRiI5vvuEK40ITczw/taE4h/H+3hjSmABV63OkTWCSPOpjJHyIjWVi86a0d9N lDe6HNVCS3OjUqoFgNcx6qWbtLthz/yNAqUjuXREtckbVClohX0d0+/MPvusVn53QNCR WdwrmKu7KaRWhbfB881pUHP+2ze/ZRsntSUHBFGF1J7qRo/PQ9anAgBk/cWv34oA9XpV lzsw== 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=uuptwRIy9iXYPcblJUzE8V5+iyWdDoxiUboOeMuw4YI=; b=iXaghdbCHCZbxazx4qV3HZrn6DfdP4u8oWhyqn1DGEMYzn8ipBcFqemp7uqyYr9X82 RPpCj+QEa4+lgFX28iTCMvGg/tBEsp8hsFhFiSmzidgo5u3ii1wVyYFoANx3r6B9ijZQ zBLkJlFwly2xhyd6NbbZU0q7V+AcCdhKtTI9qV15dXitQ3Fwbpp5JliC9LKcJrzrD2sE GD8kyh+oNo21faJvPTrJl1oLBcT/F63ibJXgPFXgf+ax3COtnhu0s7ns+sDJmlXEHCSX 8eLcSzpHAQuKMF0KbDopY82K+B7HMrWTLXlWuxZpTh3r/mw574iOwMbVxNEvDsXDxGQj ykIg== 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 n26-20020a170906089a00b007adf388f2dasi3342198eje.497.2022.11.03.22.50.36; Thu, 03 Nov 2022 22:50:59 -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 S231673AbiKDFtx (ORCPT + 99 others); Fri, 4 Nov 2022 01:49:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231331AbiKDFsx (ORCPT ); Fri, 4 Nov 2022 01:48:53 -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 79AEB27B15; 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 78C06620C3; Fri, 4 Nov 2022 05:48:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5389EC43149; Fri, 4 Nov 2022 05:48:49 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1oqpZr-00719a-2v; Fri, 04 Nov 2022 01:49:15 -0400 Message-ID: <20221104054915.739076753@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 04 Nov 2022 01:41:14 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton , Tejun Heo , Zefan Li , Johannes Weiner , cgroups@vger.kernel.org Subject: [RFC][PATCH v3 21/33] timers: cgroup: 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?1748543533570497117?= X-GMAIL-MSGID: =?utf-8?q?1748543533570497117?= 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: Tejun Heo Cc: Zefan Li Cc: Johannes Weiner Cc: cgroups@vger.kernel.org Signed-off-by: Steven Rostedt (Google) --- kernel/cgroup/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 2319946715e0..e0c59a3b52e5 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -1687,7 +1687,7 @@ static void cgroup_rm_file(struct cgroup *cgrp, const struct cftype *cft) cfile->kn = NULL; spin_unlock_irq(&cgroup_file_kn_lock); - del_timer_sync(&cfile->notify_timer); + timer_shutdown_sync(&cfile->notify_timer); } kernfs_remove_by_name(cgrp->kn, cgroup_file_name(cgrp, cft, name));