From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B62BFC61DF4 for ; Fri, 24 Nov 2023 18:43:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VuxFwDJyyY4pN5yeMEI08R8xo0dyeSfUbxYrkTSZsLM=; b=X+6DNj/gztpfVg u82h+9DiVEbSvRolIzDoTqXbNvoH3wyprUyLIc7VHidgKzI8M3XcSVItRHOyawK9VoExsDK0b+GLV BAC+aXJ83c/EOJUmoG8IqkiUl4b896xK+sRAIAgGYRZcKFNYbN2xJqRXI85MPIcszgvidQuSAfUMv OkWncnx3NC5Q5K/GrTb7GeSMC/yrAF1sm940bUsJL2QGbAJbXr2z4WuD9d6qZRBfait0gEBRYu4tA 973MflQDQqJ+5r+44VhOY1NKxGf3JjgMLkVIifIwaE7JTj2/GyNyQRqk2NKlCcx4ZAquiQZDrmxzl 1boHpUOlIaxVZpQ0u5Xg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r6b8v-007tVg-2u; Fri, 24 Nov 2023 18:43:09 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r6b8t-007tV2-1U; Fri, 24 Nov 2023 18:43:08 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id CFDEF623C0; Fri, 24 Nov 2023 18:43:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12139C433C7; Fri, 24 Nov 2023 18:43:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700851386; bh=XfGLfOIgKNcjrNSjNEBK5FWdw0y2NMMK6HCt/LP+kug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z7Gj9TEwZ+cnKCu2EW8FlsAo4J7eQZFc9y8RkjrRzajVFHTXXqtn/PPgSX7AR66hm pW7Pu/Qda5ONmcBBG37qZm4xVYD3gNZsR87fp9ZwN90Ka9E5cYTBQ7x6Q7zKlnXAzM +WVVPem9Pn+1dHhcPOkp6Un3f71/5k0XcesPJx8k= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Guillaume Ranquet , Bo-Chen Chen , AngeloGioacchino Del Regno , Dmitry Osipenko , Chun-Kuang Hu , Philipp Zabel , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jani Nikula , Chen-Yu Tsai Subject: [PATCH 6.5 427/491] drm/mediatek/dp: fix memory leak on ->get_edid callback audio detection Date: Fri, 24 Nov 2023 17:51:03 +0000 Message-ID: <20231124172037.441688419@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231124172024.664207345@linuxfoundation.org> References: <20231124172024.664207345@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231124_104307_544575_65E4D8ED X-CRM114-Status: GOOD ( 12.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 6.5-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jani Nikula commit dab12fa8d2bd3868cf2de485ed15a3feef28a13d upstream. The sads returned by drm_edid_to_sad() needs to be freed. Fixes: e71a8ebbe086 ("drm/mediatek: dp: Audio support for MT8195") Cc: Guillaume Ranquet Cc: Bo-Chen Chen Cc: AngeloGioacchino Del Regno Cc: Dmitry Osipenko Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: Matthias Brugger Cc: dri-devel@lists.freedesktop.org Cc: linux-mediatek@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: # v6.1+ Signed-off-by: Jani Nikula Reviewed-by: Chen-Yu Tsai Link: https://patchwork.kernel.org/project/dri-devel/patch/20230914155317.2511876-1-jani.nikula@intel.com/ Signed-off-by: Chun-Kuang Hu Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/mediatek/mtk_dp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/mediatek/mtk_dp.c +++ b/drivers/gpu/drm/mediatek/mtk_dp.c @@ -1983,7 +1983,6 @@ static struct edid *mtk_dp_get_edid(stru bool enabled = mtk_dp->enabled; struct edid *new_edid = NULL; struct mtk_dp_audio_cfg *audio_caps = &mtk_dp->info.audio_cur_cfg; - struct cea_sad *sads; if (!enabled) { drm_atomic_bridge_chain_pre_enable(bridge, connector->state->state); @@ -2010,7 +2009,11 @@ static struct edid *mtk_dp_get_edid(stru } if (new_edid) { + struct cea_sad *sads; + audio_caps->sad_count = drm_edid_to_sad(new_edid, &sads); + kfree(sads); + audio_caps->detect_monitor = drm_detect_monitor_audio(new_edid); } _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel