Received: by 10.213.65.68 with SMTP id h4csp438849imn; Tue, 13 Mar 2018 09:04:51 -0700 (PDT) X-Google-Smtp-Source: AG47ELsv+XEGescaTY7pV4XAMivMJl512eAgtRGwSY1ZZ15JsKYml1GCTq7qhTq93mlMbnyyD/yD X-Received: by 2002:a17:902:3383:: with SMTP id b3-v6mr1041969plc.224.1520957090986; Tue, 13 Mar 2018 09:04:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520957090; cv=none; d=google.com; s=arc-20160816; b=toRkCgXVc/QxyqT3tOApK2YK91vGdl5xAOJdmL8oF654OoY1ALntGX1MpGsp3kwEUr 82m5kw4t4DaMI9JRLPqVtULrNY2Bue1eC3Z4z02U9mNyKwJIGT/hbLCD6tGruF3SYqDc CjaHT8KmPfXq9rZ2Kg32qq4uihiqiBuddGjRARWMb79t4WtwjMMvExtM5YRT5Cy09rIh YtuhOW/STMFE+ypFwInjF6N6t0Fpzxdm3zrbmllyzP1z6iqLQ4u6l/n5wT/ojyTvmG+i ErrM9Gy/N3tZFDd0M+domhRJc6lrnM/Yb8qy2mORsEuTeEreS8/CZlKFgP2BqxflHIjT DRdw== 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=PCLkEZc4W03UhBmR5C3yLfNLbC1kMI2EdCvjx+95Nuo=; b=lMUw73Ox9X82/umQ18ZkEAhkUfG8Pal77cwqYtn11HC8CpFIcd+duqJSzJtcGBYrxO fBhO/oN0PryYj6wmlZxucxsj/1u3dDROCI1D77ECya/AqYz4Cz6E5+6DAU0mF+M7nLe/ FySroL425uH3q5qG1aKR+Otsfx8NukLqW9/PNvrewOYTNcRYwH1EeOfiMLu0TFlhLe2l YoAMa+ogQJCtkzdux7tGcApPrYLJotIWWJdHt5guJDo1TEHUBOvCW8GKrhxRGGtJmqKZ lqtGF48KOrcgCCyXcp3B8k9FiAkDAvpV8Uo+E6pOdoy8RBR88Onaw0WjlNcdxU12z3dE zRPg== 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 102-v6si334736pla.230.2018.03.13.09.04.11; Tue, 13 Mar 2018 09:04:50 -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; 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 S934387AbeCMPha (ORCPT + 99 others); Tue, 13 Mar 2018 11:37:30 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:33982 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934343AbeCMPh2 (ORCPT ); Tue, 13 Mar 2018 11:37:28 -0400 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 84B991251; Tue, 13 Mar 2018 15:37:27 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chris Wilson , Tvrtko Ursulin , Joonas Lahtinen , Rodrigo Vivi Subject: [PATCH 4.14 053/140] drm/i915: Clear the in-use marker on execbuf failure Date: Tue, 13 Mar 2018 16:24:16 +0100 Message-Id: <20180313152501.815279876@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180313152458.201155692@linuxfoundation.org> References: <20180313152458.201155692@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.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chris Wilson commit e659d14ed48096f87a678e7ebbdf286a817b4d0e upstream. If we fail to unbind the vma (due to a signal on an active buffer that needs to be moved for the next execbuf), then we need to clear the persistent tracking state we setup for this execbuf. Fixes: c7c6e46f913b ("drm/i915: Convert execbuf to use struct-of-array packing for critical fields") Testcase: igt/gem_fenced_exec_thrash/no-spare-fences-busy* Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: # v4.14+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20180219140144.24004-1-chris@chris-wilson.co.uk (cherry picked from commit ed2f3532321083cf40e4da4e36234880e0136136) Signed-off-by: Rodrigo Vivi Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -499,6 +499,8 @@ eb_add_vma(struct i915_execbuffer *eb, u list_add_tail(&vma->exec_link, &eb->unbound); if (drm_mm_node_allocated(&vma->node)) err = i915_vma_unbind(vma); + if (unlikely(err)) + vma->exec_flags = NULL; } return err; }