Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2960781imu; Mon, 19 Nov 2018 08:39:38 -0800 (PST) X-Google-Smtp-Source: AFSGD/XrJv5Qg2KPVK7qNA+F17RzTs5bIJBNvE87/H9W0xEDmguGv9PeF6UN1d0hOTCPdNmNz1tB X-Received: by 2002:a63:6506:: with SMTP id z6mr2213201pgb.334.1542645578776; Mon, 19 Nov 2018 08:39:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542645578; cv=none; d=google.com; s=arc-20160816; b=IeecJuZyihK1KIfeq0gWgx3eanUipOulz7y1KF293bTUeR4Upkm8RP4omdJlNaNIBg YB5dsVTGl90u8/hKW3oOkbcXW8nQiyCPqYfsT3kerOikVthKZrH4TsrcHyu7b39n5jgz KcHthmAL+V2nEvjKZLf/zr4zTHdh9wBozFtW1xU5qNNDNkNaJBso4ooJ4MBxdk5jhLDy N00F7gIEcxF5mA/w0iagx8UNMk/nw3vqqcr7HF8pN1TTZ+2mSaaVc1VhwSMO6IMkJniO DIjsFaInFJ2Fk6FhyErb1P2Q7bl6BU7F+IDmVaYY7iJ67rnBaYGOw5eompWvqsMpLDfr fwAA== 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=P2QQi22Q4BnYzFIB3cOImjBTxfrZ+Q0eVAkHE86+MHw=; b=ly3cfjhZ5Wzhhs4rn0UsrPUD+8olM7oqav6uFGb9xWki2NwFQeuIalNdOAZxtn0Xa1 MAX+oSqthHGNSA3u8VDsfv1LaLnmsQLWWsqzagyKDJB9p+d51o7Mw4nzuOgvc5DjFkMj tYzSEQ5XiEW/lReF1GqdUhZp9vYU5ZXD5qe87bqFYcivBPCE+GjNx4Hb6LB/JX3vFU+E FJKsTvzyJYmmIrtJiOzqGuvg68lwGMA3DRHYWDNZ+xaW7v8ZGqDPWd51c1pR2SNa4zTO OBss294eGAV5dTaWjSlskDTlAMvbpnHJAyo9NGlRzqXN/z/iTlY/Mx4y6Xg7KSwzbjk9 /9mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nuq9Z0Bs; 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 h80-v6si40708910pfj.112.2018.11.19.08.39.24; Mon, 19 Nov 2018 08:39:38 -0800 (PST) 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=nuq9Z0Bs; 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 S1732547AbeKTDCw (ORCPT + 99 others); Mon, 19 Nov 2018 22:02:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:35272 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731835AbeKTDCv (ORCPT ); Mon, 19 Nov 2018 22:02:51 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 CE21120831; Mon, 19 Nov 2018 16:38:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645522; bh=q2CMDQ+r9sNWZ/SIHw/CptAMwqoiVqoCeJTEY9KTJXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nuq9Z0BsB8rabGWhTQvQtM+kMb+uVLiYQpDX6hWCXOrJCKwEclJFWrmE8UqFhmliu 8TMUAEOMhhvZ1egQVK9XNXImXhxSTBcrgVhvR4nVjW3sGixabRzQtsewCU4pljHVVL yEtns4Pun1t7vr4+XCnO5BZxsUAkhclyT8Vp5FXU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maarten Lankhorst , Vidya Srinivas , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Matt Roper , Joonas Lahtinen Subject: [PATCH 4.19 195/205] drm/i915: Fix error handling for the NV12 fb dimensions check Date: Mon, 19 Nov 2018 17:28:22 +0100 Message-Id: <20181119162642.310527649@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162616.586062722@linuxfoundation.org> References: <20181119162616.586062722@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ville Syrjälä commit f42f343887016330b321dd40eebc68c7292e4f1b upstream. Let's not leak obj->framebuffer_references when we decide that the framebuffer domensions are not suitable for NV12. Cc: stable@vger.kernel.org Cc: Maarten Lankhorst Cc: Vidya Srinivas Fixes: e44134f2673c ("drm/i915: Add NV12 support to intel_framebuffer_init") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20181029140031.11765-1-ville.syrjala@linux.intel.com Reviewed-by: Matt Roper (cherry picked from commit 3b90946fcb6f13b65888c380461793a9dea9d1f4) Signed-off-by: Joonas Lahtinen Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -14582,7 +14582,7 @@ static int intel_framebuffer_init(struct fb->height < SKL_MIN_YUV_420_SRC_H || (fb->width % 4) != 0 || (fb->height % 4) != 0)) { DRM_DEBUG_KMS("src dimensions not correct for NV12\n"); - return -EINVAL; + goto err; } for (i = 0; i < fb->format->num_planes; i++) {