Message ID | 20221104054917.543373979@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 l7csp192322wru; Thu, 3 Nov 2022 22:56:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Y44Yr24xTBVWIYipUZ5DBLHWiKOwH4Iguy+y569RlCpgxkKa8giP3f0WWn+1WEBIQjsdw X-Received: by 2002:a17:906:5d10:b0:7ad:e132:bb85 with SMTP id g16-20020a1709065d1000b007ade132bb85mr21948707ejt.367.1667541385872; Thu, 03 Nov 2022 22:56:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667541385; cv=none; d=google.com; s=arc-20160816; b=NztgbbhwgCCVyhJ0TxL307iFjgC0GXlQHlIhLEPKhYYJnxhrV8FPmOlLXNY4CkFDz0 UmhWEwZg0IoHk63mO8iPQBop/nUtz5Nf2nR2KzTnzIOAWEHqjyaeLva9/upDNiQD7USW YzD47stFlbmB0GxJAEd4q5JHB69bsU6o9URlqu+bfeeDbvsEX6lGzeOkFJMaq1AUeSKF aRy1lJ5fV/Qpff0RLIXg2YGGlgq9t4VaXwCCW6UOS1jNJB6UGlrAFA0mhsVDuR01bCF5 hNkuGSH0CZRt0lMlWDE9G5faZYmrOUuUVloAZ7NJimMAJkoBVuFt0LcBzTm5l3tuhxIe ji+g== 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=YtXoqWp2uAo4rvcnU0eqN+iDqmmb3a63vxGCZUc38Zg=; b=Z+Uejz5vVWFF2NvMCD8ikTw1G2IjnVUvMID0CmeX1buUs5P92lpCRttvabFem080Zx ehQzFR4NxajZXLBAyA8wHhAAXGFRbajEWchg7BuQ6FX2kcmpkWW9gY8HsUYMfcFV4T62 VZpv5ua/P629IJ/TeB5w/ReMkmybbMAL6wXlpIP5vYJSz8FLdJBzGylwPNxFo863vnkX Mzm0NfCuylpt2ypA0ZLBV862wmi5aXB21p2RPjR2u4tHnh444zdvgQ6RMHrbei/4rd3A MH9U/D2BkNkMMAp8DLVul8XmrjZHLoyHlMxbOF+ukDFyF+SZi5q1DBA0HMo8Ywvw7iUq l8BA== 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 hq10-20020a1709073f0a00b007adca6532d5si4057756ejc.708.2022.11.03.22.56.02; Thu, 03 Nov 2022 22:56:25 -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 S231309AbiKDFuy (ORCPT <rfc822;jimliu8233@gmail.com> + 99 others); Fri, 4 Nov 2022 01:50:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231338AbiKDFsy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 4 Nov 2022 01:48:54 -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 7846D2873B for <linux-kernel@vger.kernel.org>; Thu, 3 Nov 2022 22:48:53 -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 C15E0620DB for <linux-kernel@vger.kernel.org>; Fri, 4 Nov 2022 05:48:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C1DEC433D6; Fri, 4 Nov 2022 05:48:51 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from <rostedt@goodmis.org>) id 1oqpZt-0071FH-2I; Fri, 04 Nov 2022 01:49:17 -0400 Message-ID: <20221104054917.543373979@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 04 Nov 2022 01:41:24 -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>, Johannes Weiner <hannes@cmpxchg.org>, Suren Baghdasaryan <surenb@google.com>, Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>, Juri Lelli <juri.lelli@redhat.com>, Vincent Guittot <vincent.guittot@linaro.org>, Dietmar Eggemann <dietmar.eggemann@arm.com>, Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>, Daniel Bristot de Oliveira <bristot@redhat.com>, Valentin Schneider <vschneid@redhat.com> Subject: [RFC][PATCH v3 31/33] timers: sched/psi: 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?1748543876578344976?= X-GMAIL-MSGID: =?utf-8?q?1748543876578344976?= |
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: Johannes Weiner <hannes@cmpxchg.org> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Juri Lelli <juri.lelli@redhat.com> Cc: Vincent Guittot <vincent.guittot@linaro.org> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: Ben Segall <bsegall@google.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Daniel Bristot de Oliveira <bristot@redhat.com> Cc: Valentin Schneider <vschneid@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> --- kernel/sched/psi.c | 1 + 1 file changed, 1 insertion(+)
Comments
On Fri, Nov 04, 2022 at 01:41:24AM -0400, Steven Rostedt wrote: > 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: Johannes Weiner <hannes@cmpxchg.org> > Cc: Suren Baghdasaryan <surenb@google.com> > Cc: Ingo Molnar <mingo@redhat.com> > Cc: Peter Zijlstra <peterz@infradead.org> > Cc: Juri Lelli <juri.lelli@redhat.com> > Cc: Vincent Guittot <vincent.guittot@linaro.org> > Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> > Cc: Ben Segall <bsegall@google.com> > Cc: Mel Gorman <mgorman@suse.de> > Cc: Daniel Bristot de Oliveira <bristot@redhat.com> > Cc: Valentin Schneider <vschneid@redhat.com> > Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Acked-by: Johannes Weiner <hannes@cmpxchg.org>
On Fri, Nov 4, 2022 at 1:11 PM Johannes Weiner <hannes@cmpxchg.org> wrote: > > On Fri, Nov 04, 2022 at 01:41:24AM -0400, Steven Rostedt wrote: > > 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: Johannes Weiner <hannes@cmpxchg.org> > > Cc: Suren Baghdasaryan <surenb@google.com> > > Cc: Ingo Molnar <mingo@redhat.com> > > Cc: Peter Zijlstra <peterz@infradead.org> > > Cc: Juri Lelli <juri.lelli@redhat.com> > > Cc: Vincent Guittot <vincent.guittot@linaro.org> > > Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> > > Cc: Ben Segall <bsegall@google.com> > > Cc: Mel Gorman <mgorman@suse.de> > > Cc: Daniel Bristot de Oliveira <bristot@redhat.com> > > Cc: Valentin Schneider <vschneid@redhat.com> > > Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> > > Acked-by: Johannes Weiner <hannes@cmpxchg.org> Assuming the whole patchset makes it through the reviews, this part LGTM. Reviewed-by: Suren Baghdasaryan <surenb@google.com>
diff --git a/kernel/sched/psi.c b/kernel/sched/psi.c index ee2ecc081422..f5f2613c4292 100644 --- a/kernel/sched/psi.c +++ b/kernel/sched/psi.c @@ -1033,6 +1033,7 @@ void psi_cgroup_free(struct cgroup *cgroup) cancel_delayed_work_sync(&cgroup->psi->avgs_work); free_percpu(cgroup->psi->pcpu); + timer_shutdown_sync(&cgroup->psi->poll_timer); /* All triggers must be removed by now */ WARN_ONCE(cgroup->psi->poll_states, "psi: trigger leak\n"); kfree(cgroup->psi);