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 2727EC61DF4 for ; Fri, 24 Nov 2023 19:00:16 +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=Higu3HIJkF1Nk2Xrv2aJMo0k86kK36gI5NMIQ+1J6GE=; b=PmiQCNMsI2KPGC ScGLUDZ3aZgj10eVfyRk8A1ciOXLdV1s2aybIIkKFBsvpoVwt9NUdW5Dt8I7nmMx4CHt6cs0oHyqn ihdKTFIfoaVYRObFQOiRsu/RqzldMeN5rlR2zccc5mvhelcbbfwwwvIpiLxVZfWrrEbX5HUI6QKRx WzpxNmtdX95Ri/7riCqNJYqqBvPMEmURK1exUh2isvL/L2cmdQZaKh0SnMEt+pS5nA4Vd+OARne/l IgEftCbMWJ6Q8XHDSXcEvf7pTB5Ton0uZdqxgtQZ66uOBBl4OFqzIukUZXqU2w0V/j40YUwDsEnuY B1iLV/Are5lDupUS36rg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r6bP3-007ux0-0v; Fri, 24 Nov 2023 18:59:49 +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 1r6bP0-007uvG-0Q; Fri, 24 Nov 2023 18:59:48 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 03053623D3; Fri, 24 Nov 2023 18:59:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57376C433C8; Fri, 24 Nov 2023 18:59:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700852379; bh=weAAYLO37DhTk8Y6IZDu25vVE/7zMyHaotCMK8Frhn8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HUq4OypyDASVzIy/XOspnS8xvKUAfT+5E2sqMkKFIzuLsqxdU75dRXsI7PXYG3uYU 0SjloS4t8vDJFA6qnQ3kT4Hwjg1iSrwzENJTHh14hCSJwQN9z8uF1oAvQ1EaQtXxkE PNUwlx6Eyd7ZqhS93Fn50TwIaptPLfx2k31lV4Yg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Markus Schneider-Pargmann , Guillaume Ranquet , Bo-Chen Chen , CK Hu , 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 Subject: [PATCH 6.1 325/372] drm/mediatek/dp: fix memory leak on ->get_edid callback error path Date: Fri, 24 Nov 2023 17:51:52 +0000 Message-ID: <20231124172021.215392068@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231124172010.413667921@linuxfoundation.org> References: <20231124172010.413667921@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_105946_212418_E519EE5F X-CRM114-Status: UNSURE ( 9.39 ) X-CRM114-Notice: Please train this message. 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.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jani Nikula commit fcaf9761fd5884a64eaac48536f8c27ecfd2e6bc upstream. Setting new_edid to NULL leaks the buffer. Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver") Cc: Markus Schneider-Pargmann Cc: Guillaume Ranquet Cc: Bo-Chen Chen Cc: CK Hu 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: Guillaume Ranquet Link: https://patchwork.kernel.org/project/dri-devel/patch/20230914131058.2472260-1-jani.nikula@intel.com/ Signed-off-by: Chun-Kuang Hu Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/mediatek/mtk_dp.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpu/drm/mediatek/mtk_dp.c +++ b/drivers/gpu/drm/mediatek/mtk_dp.c @@ -2005,6 +2005,7 @@ static struct edid *mtk_dp_get_edid(stru */ if (mtk_dp_parse_capabilities(mtk_dp)) { drm_err(mtk_dp->drm_dev, "Can't parse capabilities\n"); + kfree(new_edid); new_edid = NULL; } _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel