From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBFA36FB5 for ; Sun, 17 Sep 2023 20:31:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03ABBC433C8; Sun, 17 Sep 2023 20:31:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694982680; bh=d/r8kp2K1qez2+oyH5+p2yyc8wNY1d86pKwm5DvdbBI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JjldJHlXyeDAU8KYEEB7EY7XwYNtjhDkq8ZOuSGy2FPFbn/xXZr90w87BuEGLbLLi /+DtM6Loe3WxCRghsQQprtqKWtHg2ZbO78Mo9RzIzZDs+8/W6/NhuTQ6wmm6kVN69o LIrlCaWPIOZ9fOsdeSQzyfZ7d6FXsM7T0O+U9pqM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Boris Brezillon , Dhruva Gole , Chanwoo Choi Subject: [PATCH 5.15 322/511] PM / devfreq: Fix leak in devfreq_dev_release() Date: Sun, 17 Sep 2023 21:12:29 +0200 Message-ID: <20230917191121.595066941@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230917191113.831992765@linuxfoundation.org> References: <20230917191113.831992765@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Boris Brezillon commit 5693d077595de721f9ddbf9d37f40e5409707dfe upstream. srcu_init_notifier_head() allocates resources that need to be released with a srcu_cleanup_notifier_head() call. Reported by kmemleak. Fixes: 0fe3a66410a3 ("PM / devfreq: Add new DEVFREQ_TRANSITION_NOTIFIER notifier") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Dhruva Gole Signed-off-by: Chanwoo Choi Signed-off-by: Greg Kroah-Hartman --- drivers/devfreq/devfreq.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -762,6 +762,7 @@ static void devfreq_dev_release(struct d dev_pm_opp_put_opp_table(devfreq->opp_table); mutex_destroy(&devfreq->lock); + srcu_cleanup_notifier_head(&devfreq->transition_notifier_list); kfree(devfreq); }