From patchwork Mon Aug 24 16:34:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 7065531 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0C5B6C05AD for ; Mon, 24 Aug 2015 16:30:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D6C5920788 for ; Mon, 24 Aug 2015 16:30:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1A41220783 for ; Mon, 24 Aug 2015 16:30:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0F7626E9EA; Mon, 24 Aug 2015 09:30:09 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4D8F56E9EA; Mon, 24 Aug 2015 09:30:08 -0700 (PDT) Received: by wicja10 with SMTP id ja10so77066437wic.1; Mon, 24 Aug 2015 09:30:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kqgq/OhRpIc0vrSg1l989uwHomntow8UgDDaiaSSiwQ=; b=H9jKjK0ZTbgEWv8wDVOvS6n//0ofxc0jZDM8tyiYxKMDltz9ywz7X7K12N45uS267z nlcFIkOpL++xj+4DujDZxMgNPQvsEu0rl5RYyq2I4CU5DJIzx/p4JVhroHew4X/HJRJ3 7YVf+PhGcUbb3Eb03hvCUGlhuabAsBZdjfgSjc7iJd4+IhB0XwtVFe8cRw5wBiajdOuF w0diaeQH6hT74Gtnx4fsIc7uzzO5nupaaphDLLnZ/N7t9RNC/7EPib14cdpBr93HqCPu f9mqg5GEsMcxOZLlTeUgj8SU8B9wp0W69LJE05cs50RB/sLztbk9xEl4NGoQoUkL+DTt RqFQ== X-Received: by 10.180.106.68 with SMTP id gs4mr29710820wib.61.1440433807135; Mon, 24 Aug 2015 09:30:07 -0700 (PDT) Received: from arch-x220.localdomain (cpc12-croy20-2-0-cust52.croy.cable.virginm.net. [82.44.54.53]) by smtp.gmail.com with ESMTPSA id ll1sm16885984wic.14.2015.08.24.09.30.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Aug 2015 09:30:06 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Date: Mon, 24 Aug 2015 17:34:07 +0100 Message-Id: <1440434060-31347-4-git-send-email-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1440434060-31347-1-git-send-email-emil.l.velikov@gmail.com> References: <1440434060-31347-1-git-send-email-emil.l.velikov@gmail.com> Cc: intel-gfx@lists.freedesktop.org, emil.l.velikov@gmail.com Subject: [Intel-gfx] [PATCH libdrm 04/17] intel: error out on has_error in exec2 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Just like we do for the original exec() Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Emil Velikov --- intel/intel_bufmgr_gem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index cf55a53..5287419 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -2190,6 +2190,9 @@ do_exec2(drm_intel_bo *bo, int used, drm_intel_context *ctx, int ret = 0; int i; + if (bo_gem->has_error) + return -ENOMEM; + switch (flags & 0x7) { default: return -EINVAL;