From patchwork Mon Aug 8 21:24:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9269767 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 E49DD607D6 for ; Mon, 8 Aug 2016 21:24:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4AFD27AB2 for ; Mon, 8 Aug 2016 21:24:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7F7A27FBE; Mon, 8 Aug 2016 21:24:43 +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 5EE3827AB2 for ; Mon, 8 Aug 2016 21:24:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A94F66E425; Mon, 8 Aug 2016 21:24:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-f194.google.com (mail-yw0-f194.google.com [209.85.161.194]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3C7D26E425 for ; Mon, 8 Aug 2016 21:24:41 +0000 (UTC) Received: by mail-yw0-f194.google.com with SMTP id r9so25295635ywg.2 for ; Mon, 08 Aug 2016 14:24:41 -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=LDbfiY2DhjFns/ngsjHREB3JEwh8cuEYEkaDX48uRdo=; b=Ecpa7V1obq9OIhOdMZ0CpYFcM8e8L30VdMtK+OSCgE1hk7uqnDFvEKkbN5IhJvnbOz IAGiqHQc0St8Q3gnS/qWwqHP/lh9WHPVjGSX3CqVFXrDz6ARFo1J8ITQA7Flhcawl1qW uuttS+ax187KNJjzXBtzdThTqgtY9SCMOJuTac4po80E3jPDnfaRUyrrHSpJ7lNAUWqD Al53gi5tX9LFt4qwkLJpGj2GHywnTxyp7zgRZGz5ZcuNu/lmuHm7vgaN78X02Azqou1f 3Jz7iptQbaKb3iXO05j7wTOrLZnb3hoElq3Jey4tMq8mwzpAxw2yMkW+wgRME5iZSozJ rjDA== X-Gm-Message-State: AEkooutLXOPrXt8MYbAVLUKfgRLQHZfSEr7N+yuosk2ZP+COwCLCiFJYJCfo0wsd08J6Uw== X-Received: by 10.13.216.150 with SMTP id a144mr74337101ywe.147.1470691480478; Mon, 08 Aug 2016 14:24:40 -0700 (PDT) Received: from jade.localdomain ([201.82.189.183]) by smtp.gmail.com with ESMTPSA id p21sm14634807ywg.10.2016.08.08.14.24.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Aug 2016 14:24:39 -0700 (PDT) From: Gustavo Padovan To: Greg Kroah-Hartman Subject: [PATCH v2 2/6] staging/android: do not let userspace trigger WARN_ON Date: Mon, 8 Aug 2016 18:24:18 -0300 Message-Id: <1470691462-19140-3-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1470691462-19140-1-git-send-email-gustavo@padovan.org> References: <1470691462-19140-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 b4ae092..ad0bb1a 100644 --- a/drivers/staging/android/sw_sync.c +++ b/drivers/staging/android/sw_sync.c @@ -150,7 +150,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);