From patchwork Thu Aug 11 15:26:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9275409 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 44B3E60231 for ; Thu, 11 Aug 2016 15:26:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 379E62841A for ; Thu, 11 Aug 2016 15:26:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C581286EE; Thu, 11 Aug 2016 15:26:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EE89C2841A for ; Thu, 11 Aug 2016 15:26:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 668F86E955; Thu, 11 Aug 2016 15:26:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-f195.google.com (mail-yw0-f195.google.com [209.85.161.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8AFED6E955 for ; Thu, 11 Aug 2016 15:26:55 +0000 (UTC) Received: by mail-yw0-f195.google.com with SMTP id u134so306160ywg.3 for ; Thu, 11 Aug 2016 08:26:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CvDbGB/mzRUM9jU7yNHEO/d+o3E5QQRRL1A8rVXeUG0=; b=UrJVGwXfU3RwlN96KnSL/1DXwhM2zDNhnCd7H6oycTWJr8MnDkkm6ljm7YEZX45OaU trMdUOi54tsZ0wgP4rLdVt5ClJEOtTPENhhXS+M7b/WFDjD+xlHlFJso5bPbTbonyb9y T/PUoIo2EaR5qTvfbqclIydlMgdZM4PVaxK7J9XktlmkBQEEoKJUX3nkFfsaf2JKxjAX Tmx+1ZfU+erAPF8KKtP8u2SaEnSfFpXll+L0PPEn6Vm0TEGQXAOxWs8bM0QYmBboFptx ZrX5/gvb+tpXsFMSPkG57w/GzRbw1TkRXrkcLEK35TaGTJGSE0M4t83e5/mPvG2enZ/j IO1A== X-Gm-Message-State: AEkoouvyaLUew7YIOaVnrb+CEsLn/XNvDjYwPV81/G241CGT22nbzE7T64/wTS8dd/QGCg== X-Received: by 10.13.192.131 with SMTP id b125mr6831435ywd.161.1470929214818; Thu, 11 Aug 2016 08:26:54 -0700 (PDT) Received: from jade.localdomain ([201.82.189.183]) by smtp.gmail.com with ESMTPSA id r124sm1180691ywg.50.2016.08.11.08.26.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Aug 2016 08:26:54 -0700 (PDT) From: Gustavo Padovan To: Greg Kroah-Hartman Subject: [PATCH v3 1/5] staging/android: do not let userspace trigger WARN_ON Date: Thu, 11 Aug 2016 12:26:40 -0300 Message-Id: <1470929204-13237-2-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1470929204-13237-1-git-send-email-gustavo@padovan.org> References: <1470929204-13237-1-git-send-email-gustavo@padovan.org> Cc: devel@driverdev.osuosl.org, Daniel Stone , Daniel Vetter , Riley Andrews , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= , pavel@ucw.cz, Gustavo Padovan , John Harrison X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Gustavo Padovan Closing the timeline without waiting all fences to signal is not a critical failure, it is just bad usage from userspace so avoid calling WARN_ON in this case. Signed-off-by: Gustavo Padovan --- drivers/staging/android/sw_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c index 115c917..bda1f6a 100644 --- a/drivers/staging/android/sw_sync.c +++ b/drivers/staging/android/sw_sync.c @@ -176,7 +176,7 @@ static void timeline_fence_release(struct fence *fence) spin_lock_irqsave(fence->lock, flags); list_del(&pt->child_list); - if (WARN_ON_ONCE(!list_empty(&pt->active_list))) + if (!list_empty(&pt->active_list)) list_del(&pt->active_list); spin_unlock_irqrestore(fence->lock, flags);