Received: by 10.223.185.116 with SMTP id b49csp712216wrg; Wed, 21 Feb 2018 05:49:05 -0800 (PST) X-Google-Smtp-Source: AH8x225mh8d6AcS8I3YXraFU9vNG1aiwsk4gR3nd3UFWyh1ehuw/iQdXGB/yI5LXBSDRh88FfQ0S X-Received: by 10.101.97.139 with SMTP id c11mr2735539pgv.449.1519220945096; Wed, 21 Feb 2018 05:49:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519220945; cv=none; d=google.com; s=arc-20160816; b=VmLAIYqRn2Yl6brbL9RW8I9T6yjwzzSKcFueVT28iq7Ii2D73pT8K3aP2VAaG8loGH 8VvPIT0KGbQ5v1tWNKi0XLh83rFEtVxto2ZH4za9gouM2PwBtSVfNfqLIDXeUQHVqDPR 46G14IWKwC1OLXqAP4TVhe9ksd/1V3RZovOX36jEY5LHg0geXxjICLf9I3XIHsoYQZhQ G8vW4IpNFL7lrGAo5gArRR51bN4sfXBOWNT6AFOGCxVUPpwuU8LcDDlpFWO9jGM90a8L G/PyQWm9VgAVzZq3w56zxzN3Y3KZivxegW2WaewinoSUDztq5H6d2iNbFu3l9HyvNE5m mfFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=FX9Gcgkex8nJQ1N9d8P9QdFcWdTTm+k7yE4B3mEt+Is=; b=gBy436EGzW3Bi9yq6oTFXKrJoEE/Z2plqJmTqcUj/ZdiYcVD2ihbhZr9kxgtcgiWZE whd+YEiFwWIs5tk8zk0tMmGzUmEZcZ6bN62/E6CubWwoA+v5qstqo1lXejMj+mLrqsA3 KKPWRfn3dmwKzbIvPhhmjoUPUshPCakrLdKJmyN3bdooJKEMnP6jDfBZpeCj8/Q3e7Kj hyncDXqQpD3RmQP7/GIh8bZsrqdjOgZ+hiizzzYfwfgNRvn/WNbRGC0JminzSIimInau XOCpLyB3eewz0sf8eVqz2bowZvvamiQ3sDUO5hnRloVmw+2BQIia/w52mIyVeY987YVH B8xg== ARC-Authentication-Results: i=1; mx.google.com; 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 t18si1193595pfg.246.2018.02.21.05.48.50; Wed, 21 Feb 2018 05:49:05 -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; 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 S936204AbeBUNJq (ORCPT + 99 others); Wed, 21 Feb 2018 08:09:46 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:43088 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965450AbeBUNJn (ORCPT ); Wed, 21 Feb 2018 08:09:43 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id CD07311F3; Wed, 21 Feb 2018 13:09:42 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ray Strode , Dave Airlie Subject: [PATCH 4.15 090/163] drm/qxl: unref cursor bo when finished with it Date: Wed, 21 Feb 2018 13:48:39 +0100 Message-Id: <20180221124535.315936595@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124529.931834518@linuxfoundation.org> References: <20180221124529.931834518@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ray Strode commit 16c6db3688734b27487a42d0c2a1062d0b2bad03 upstream. qxl_cursor_atomic_update allocs a bo for the cursor that it never frees up at the end of the function. This commit fixes that. Signed-off-by: Ray Strode Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/qxl/qxl_display.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -575,7 +575,7 @@ static void qxl_cursor_atomic_update(str struct qxl_cursor_cmd *cmd; struct qxl_cursor *cursor; struct drm_gem_object *obj; - struct qxl_bo *cursor_bo, *user_bo = NULL; + struct qxl_bo *cursor_bo = NULL, *user_bo = NULL; int ret; void *user_ptr; int size = 64*64*4; @@ -645,6 +645,8 @@ static void qxl_cursor_atomic_update(str qxl_push_cursor_ring_release(qdev, release, QXL_CMD_CURSOR, false); qxl_release_fence_buffer_objects(release); + qxl_bo_unref(&cursor_bo); + return; out_backoff: