From patchwork Thu Oct 27 15:05:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 11837 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp287170wru; Thu, 27 Oct 2022 08:11:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6126iAvL98OSpE48omqiZReqLQ6uzlJRK9szwTbJ5uGK0AjcxOgTHjPGQ0PBVyDuD97/c+ X-Received: by 2002:a17:907:72cf:b0:7ad:7e95:69d7 with SMTP id du15-20020a17090772cf00b007ad7e9569d7mr7158151ejc.97.1666883518098; Thu, 27 Oct 2022 08:11:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666883518; cv=none; d=google.com; s=arc-20160816; b=Pl9cmer+9NrNi3H1uQwiKEzho8iGXGZri/zN4Upd5AKnD77/rxcPCAi/NQfkVbq9r0 D4pO9nFT+OIkp+OuTopoxfXAmqPavL2P+rRn3sAGgcSdeMnwASfI+dCFhOSs9Yt8z2ia iu4KXe153pSYzZ76F3lENdv6Dpd1sjZ+i2hn+5DFcLBCzjSwHKH4ivvef3I9076deucH TalvoMj1s/C1CxlDsac8Ntd12GLorBQ8G+SQN812e708fWzrvSPV50EEttdjZk+C7Ppx 7Ol13YXRXEu0AJZ9Nq2L1tpNOKsmFEvOm+DEHAkScJjP0hxEqskIVEqgIhX+yRD1h+XL waHw== 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=qvIV17nAC1dw5GQVFlNDcDKM2LrRRV2gvfVzTbA05ZU=; b=iu2gL3pm2/7AmnyFnylhdg5Qwjyxqh8NS/62xoH9jPirhYTJ/9Sf76IdG/cQgSpEEp VdbcFf5zYLWR/fOH1slE4tD7BrM4XhkYEh1zE9RnA/wDDIWh4Jp/cVs73XrHTB7o0LMk RoKnWY9USqXR39wiykTclrp+zNoknURZnNXr3HnEiyzGCcP4UpvtKzv4lQ4yFzk8hvkl FwxhlzUwtZMvouB1NomRs9ffzzxDnkjOp63yzLSXRXJe0HcMgz3QEUOKY2M/nr82cWDW GPWPSCc5bJLiBAlYJ7EtfS1UmKpZaX8RZBz81kWQA5ZXx2ZBjurnu4Z2OhgfcvdmboD5 viKw== 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 m5-20020a056402430500b004590ae88029si2227633edc.610.2022.10.27.08.11.33; Thu, 27 Oct 2022 08:11:58 -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 S236141AbiJ0PKo (ORCPT + 99 others); Thu, 27 Oct 2022 11:10:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236068AbiJ0PJR (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 7198018F26F; 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 5271F623AD; Thu, 27 Oct 2022 15:09:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E33EC43148; 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-00BvdL-18; Thu, 27 Oct 2022 11:09:29 -0400 Message-ID: <20221027150929.173042402@goodmis.org> User-Agent: quilt/0.66 Date: Thu, 27 Oct 2022 11:05:46 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Tejun Heo , Zefan Li , Johannes Weiner , cgroups@vger.kernel.org Subject: [RFC][PATCH v2 21/31] timers: cgroup: Use del_timer_shutdown() before freeing timer References: <20221027150525.753064657@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?1747854051800997570?= X-GMAIL-MSGID: =?utf-8?q?1747854051800997570?= 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.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 7f486677ab1f..4b15a481ca2c 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -1669,7 +1669,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); + del_timer_shutdown(&cfile->notify_timer); } kernfs_remove_by_name(cgrp->kn, cgroup_file_name(cgrp, cft, name));