Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4814181yba; Tue, 30 Apr 2019 04:58:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqw86Ho9LQnMTIDq7epEx86asMdQyp4RcmEBegm/FcujYk6ENc1v8LiiRiSkpXZWgKWechko X-Received: by 2002:a63:a18:: with SMTP id 24mr63890224pgk.332.1556625494853; Tue, 30 Apr 2019 04:58:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556625494; cv=none; d=google.com; s=arc-20160816; b=LUrDHEBkohTJLgleoCtElpgdz3CY5uSFxm4vlbwzeqLxsG5iody317xRB3phsn7PuT 6maUcplvdXaLX4ZTeb1jQQBVqpwtVE8NUx45TVo28YA1hWmyAsaNvLQVymk10NQk82TM LQk2TRFryAjwdpGKv7q1UjFdLZO4v6FQSJt/mgP7sEzBCQ06Q7z7jitj24OlPpX14Wnr LFfOkPDCpCEiaRS+sXIFe4hF9FAFwRq7KijFSvhSNe/fLEg0I9HBd7MTm3OdWva1p2HO Cjb9tprlcsXSjFjVJqTdjq3V53myYxyIWHPxfvvFBvrlP7crx4Z7I0EYkVs2ovwGIm67 UmYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=B7a0g+uDRg+KZuZeMQdDNqjqNOg0apjbaxWmNJBXRwg=; b=JbIKeUocsMiQqqgNXZE6yepCqYsxEAUevN0Xu+d/BAKw7+rZ7BbbkA40xNWGHOny7B z66+gAOahgv7kwMbWeE9JsIeaeKP0iQBX6dfHJ0KPDGuXmGnnuUZm7hw9V05KHkLBxMD whjdtlFRY43GZtFHztE3OOrNX84jeA5xRxr5PaDGivFwI/647/tye3NHx2DLY39lJDeT SLTfjZsFUpxymdqS99lXQX+Idw6ZnAiTxYxDOqsi+JK+zXi8GAXofFJq1jgz/WuuhDYx 0X7r7V8xInXwNpp3TjOc5Kp7hvoLes4N9IrljUb+CvS7IiJ2ytM1u/xYXTeQz/Z9VnH6 7QWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="fpaVVSB/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o123si39595729pfb.116.2019.04.30.04.57.59; Tue, 30 Apr 2019 04:58:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="fpaVVSB/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730155AbfD3Ltl (ORCPT + 99 others); Tue, 30 Apr 2019 07:49:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:36182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730709AbfD3Ltg (ORCPT ); Tue, 30 Apr 2019 07:49:36 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A2CE22054F; Tue, 30 Apr 2019 11:49:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556624976; bh=jW8B9fYnNhCMmM+VOfJleRK+4+pNzZlDG3cyYS2Wj5M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fpaVVSB/vhPM91pvmlGG+17r/n8Oy9lpjVtjwzy1FktvCFGmX4tF683oWyzO47i78 RhIiAr41cp3m/xw+X+E7SWWY1DACgAT1ArhfOt8R2EsMSuf2snpPjNut6XPAhkUlo/ Ngym9AbmQx5fND5PUvNyYxgA7YYyRb8/35d/hnv4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Anholt , Maarten Lankhorst Subject: [PATCH 5.0 42/89] drm/vc4: Fix memory leak during gpu reset. Date: Tue, 30 Apr 2019 13:38:33 +0200 Message-Id: <20190430113611.755099705@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190430113609.741196396@linuxfoundation.org> References: <20190430113609.741196396@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Maarten Lankhorst commit d08106796a78a4273e39e1bbdf538dc4334b2635 upstream. __drm_atomic_helper_crtc_destroy_state does not free memory, it only cleans it up. Fix this by calling the functions own destroy function. Fixes: 6d6e50039187 ("drm/vc4: Allocate the right amount of space for boot-time CRTC state.") Cc: Eric Anholt Cc: # v4.6+ Reviewed-by: Eric Anholt Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20190301125627.7285-2-maarten.lankhorst@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/vc4/vc4_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -999,7 +999,7 @@ static void vc4_crtc_reset(struct drm_crtc *crtc) { if (crtc->state) - __drm_atomic_helper_crtc_destroy_state(crtc->state); + vc4_crtc_destroy_state(crtc->state); crtc->state = kzalloc(sizeof(struct vc4_crtc_state), GFP_KERNEL); if (crtc->state)