Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp265756rwl; Thu, 3 Nov 2022 23:22:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM68zAgZBJAhp3KHZ4BhPTETpYUYsRsiUL4XJwL4b84aQeYKbMV3fBspMmi4PibiXuVVuKKi X-Received: by 2002:a05:6a00:140d:b0:528:5a5a:d846 with SMTP id l13-20020a056a00140d00b005285a5ad846mr34858395pfu.9.1667542950913; Thu, 03 Nov 2022 23:22:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667542950; cv=none; d=google.com; s=arc-20160816; b=viMuZ5RTJNfFsbp18HEM4OOzvTrMaEGVknnJ3lvddYO28Y9Zc2MLzFH490w7glOJGZ uB0JRaWx1AzAfdjYDrohWFSg5xPEZhK3b4KyvWhCb1BKQ7MGvGZmgaSpZMD5DFSniZpg kiDehAyvJ55C/RGXecTWAvOXlh1NVCFwWZ6XToQz2xO3SzNOseLU1+42M+nIZEmP164Z g1zNpqFH9D+ZVfXohnz7RxY0nshb4zq5+ONHUcZfgXCm5bu8yIaET8do5aMKufjMsqxl AErgJCQBPIZZPzBZvEvCtl46Sh3SJeUExsrmb4A2uJGoCVpIrVpJ+c7PN7ZeU+yYS1pt k9TA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jo13-20020a170903054d00b001867db1d29csi2866847plb.60.2022.11.03.23.22.18; Thu, 03 Nov 2022 23:22:30 -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 + 95 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 ); 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 ; 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 ; 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 ) 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 To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Thomas Gleixner , Stephen Boyd , Guenter Roeck , Anna-Maria Gleixner , Andrew Morton , Johannes Weiner , Suren Baghdasaryan , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider 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: X-Mailing-List: linux-kernel@vger.kernel.org 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: Johannes Weiner Cc: Suren Baghdasaryan Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Ben Segall Cc: Mel Gorman Cc: Daniel Bristot de Oliveira Cc: Valentin Schneider Signed-off-by: Steven Rostedt (Google) --- kernel/sched/psi.c | 1 + 1 file changed, 1 insertion(+) 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); -- 2.35.1