From patchwork Mon Jun 20 15:53:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 9187925 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 9F44F6075E for ; Mon, 20 Jun 2016 15:54:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DFCF223B3 for ; Mon, 20 Jun 2016 15:54:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 82BC02766D; Mon, 20 Jun 2016 15:54:33 +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]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43C70223B3 for ; Mon, 20 Jun 2016 15:54:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3905F6E14B; Mon, 20 Jun 2016 15:54:31 +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 6BA486E45B for ; Mon, 20 Jun 2016 15:53:39 +0000 (UTC) Received: by mail-yw0-f194.google.com with SMTP id v77so3518699ywg.2 for ; Mon, 20 Jun 2016 08:53:39 -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=e9hgBSAJC/x/tgc2h7qzRNlQIpsqicu9v6uoUXUzdjk=; b=MOBXY9hBz674k/1bu2OTCrlcGP8+SPigVtvsGb29aXYHUjW5E9xRDVAgVY49RYtBRf irqsr2GmaI9qVNOXPd6Vrp6riECKUlOpoiWkmibABERez/kKd6Ot6lmJmmq+epjNU9ur fIFeW8eHfj+i7Db8gVTVUd5EFr5RZkcuFDUM6BB+sPmE87uEej0Y6opQYs7PCVRD9Q4R 6Zd2ipHjQc1F+2pxZDQgz3S8XnXY8BhyEIyRwX9+nWNZ2GpUB0iD7+hRwxToVRIaOuFu TFBSCAbA+UnU0WEtmL/UCQnMJX1N4jmiDxDvW7+6poNO8uwUlpOPMkL7HyvWw8JPYIds t1VA== X-Gm-Message-State: ALyK8tJHKqPCgqiPhIh5LiCLjZBAqGoQcXY/4LJgd1iWKKG8IG+JLnzr7vJzZK5nz5Xs/Q== X-Received: by 10.13.245.67 with SMTP id e64mr9137970ywf.306.1466438013471; Mon, 20 Jun 2016 08:53:33 -0700 (PDT) Received: from jade.localdomain ([189.61.225.79]) by smtp.gmail.com with ESMTPSA id d205sm29098234ywe.49.2016.06.20.08.53.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Jun 2016 08:53:32 -0700 (PDT) From: Gustavo Padovan To: Greg Kroah-Hartman Subject: [PATCH 3/7] staging/android: do not let userspace trigger WARN_ON Date: Mon, 20 Jun 2016 12:53:09 -0300 Message-Id: <1466437993-21573-4-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1466437993-21573-1-git-send-email-gustavo@padovan.org> References: <1466437993-21573-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?= , 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 ea27512..66837ca 100644 --- a/drivers/staging/android/sw_sync.c +++ b/drivers/staging/android/sw_sync.c @@ -142,7 +142,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);