Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3683295lfo; Mon, 23 May 2022 11:19:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVHS36aaYBIlBuLG2QHqtjzDkp/yvruYCeyjypGqXDElOXt/38ZoX2bnlVVyhyq69IvSNB X-Received: by 2002:a63:1d4:0:b0:3c2:479d:39e0 with SMTP id 203-20020a6301d4000000b003c2479d39e0mr20928599pgb.427.1653329944909; Mon, 23 May 2022 11:19:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653329944; cv=none; d=google.com; s=arc-20160816; b=dk6Bih+Gi0Wr12L2hM4W/4hWmgYp8+pHjC/R0aXh8iy5hP3Uys2BLShcoCo/NJEzV0 SyTdYGrgIjjZCf/EhnPnoz9mvo6W5SOwerSy95Qwe2U87x0COexku+GXgkeQ0LKXGiHo dRAaauwoHMP2WP0kyFHZFt7AH9AOhzvptRPmZNziNmW/FuHd/ftuCq7zkQ8qNav+9S68 iljRmY6QYZAG+xvxq/Z98d/orZUq1UhEoZnV2hoi2I1F11ziEDrzTp1h1D/w1E7RYwQ6 0oKfieJZmkQz5BWbZLTxjSYmdqEpbhjUfJIyonb1hO8jJ6qG2o2UAxaKTGqywJggjeje KsGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=H84ZE41npjRneQtFDrDrYteJZBbROeHTIk06pgchfis=; b=ubzts0d2yyxzvDLVqxddm0sDWnyDMB1OIGeifF/A6mx4XZQv8qxaPL1QgACmFbKh0l QP6zTtKxcH10IpIc8Pav8eI3Pi2Bips48DaiP6LlECyQ/vxkKIRJSK2MV7yEqLvEUAfr 24CG+4yoeSWAmB0FHSRMPzwRZDH9V2+WJhfkH0s6aqB5Yz8FR4HzxgCVX6/e7wwMAGJH 4DLxSWD+0cOhxN5nMluB/Cnj/rRbDAUL4js8WOXIOiHFoQbqvXXhMdW0HGlqxxb8doKf EAvdYE+3boPGZH4ap7xIZcDqhcm4jjFvq8V3Vp9z7pafZ5iCerBIhLwo0H8em8fTdrtD Bqew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DBLiRQRG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id ev21-20020a17090aead500b001dfc03117d7si21502pjb.71.2022.05.23.11.19.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 11:19:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DBLiRQRG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 67E0E120A3; Mon, 23 May 2022 11:16:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245231AbiEWSMw (ORCPT + 99 others); Mon, 23 May 2022 14:12:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241743AbiEWRf4 (ORCPT ); Mon, 23 May 2022 13:35:56 -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 AADEF87A0F; Mon, 23 May 2022 10:29:23 -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 3AFAF61194; Mon, 23 May 2022 17:28:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42406C385A9; Mon, 23 May 2022 17:28:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1653326912; bh=wkVrRs3ZmXWibR3yswrRvgW92+HWI718OMiomhJwUwg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DBLiRQRGPlY1bTnUJNf3mptOGBGNjHk5/ECadAhAr6nMetD1+syA251B+7InjDk76 gaK+3qZgcQJ4/Wp0sfd8KzEnYTXsrS0hNZ3hcfwID8cL8KI/ji65Ppo5C08bnC1Njr B5SliDu4C9ZTwPpFZQ4pRD3+8435+KQxczZt1BcM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hangyu Hua , Lyude Paul Subject: [PATCH 5.17 065/158] drm/dp/mst: fix a possible memory leak in fetch_monitor_name() Date: Mon, 23 May 2022 19:03:42 +0200 Message-Id: <20220523165841.635430513@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220523165830.581652127@linuxfoundation.org> References: <20220523165830.581652127@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: Hangyu Hua commit 6e03b13cc7d9427c2c77feed1549191015615202 upstream. drm_dp_mst_get_edid call kmemdup to create mst_edid. So mst_edid need to be freed after use. Signed-off-by: Hangyu Hua Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20220516032042.13166-1-hbh25y@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/drm_dp_mst_topology.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -4852,6 +4852,7 @@ static void fetch_monitor_name(struct dr mst_edid = drm_dp_mst_get_edid(port->connector, mgr, port); drm_edid_get_monitor_name(mst_edid, name, namelen); + kfree(mst_edid); } /**