From patchwork Fri Mar 1 00:43:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 2201691 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 8B801DF24C for ; Fri, 1 Mar 2013 12:52:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 80578E6484 for ; Fri, 1 Mar 2013 04:52:01 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pb0-f46.google.com (mail-pb0-f46.google.com [209.85.160.46]) by gabe.freedesktop.org (Postfix) with ESMTP id BDF7BE6731 for ; Thu, 28 Feb 2013 16:44:17 -0800 (PST) Received: by mail-pb0-f46.google.com with SMTP id uo15so1395823pbc.19 for ; Thu, 28 Feb 2013 16:44:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=fTOYLT1mmccjJ/L2F4pxYGC0YSlzuBFudShoRYnhFB4=; b=huasVpGMmOcmW74dnYkcWTDkt+q5ROcKq7rLyJ3RSQ18O2POiCU7KmGxo9GXBE61UG cYeQ72bwPSEbqgzFS0jtl683K0E+E7xhxyhaP6m463+Z1d6eSwNk88LfrMU9gkoa1ITU 6wqL6TyFcjk4KrL2huct2x7+gTmGU2vfQPIy9kh3RQsz7ccvs1G/kDBe77ax41IuH5S9 +oP9Zg+/dYzyWZZ9/0AZJb/z118Z0SPipVNnCT0S1y1n/9hzomoqBlV8dFhvCgj3LG4C 6K2hFC66Bypqa0HOwBUxImemYMRJqpDM2LVbbZDLm67UhcvCccA4EXXVWzFHrOn+lJGe Pp5g== X-Received: by 10.68.116.169 with SMTP id jx9mr11792111pbb.94.1362098657739; Thu, 28 Feb 2013 16:44:17 -0800 (PST) Received: from localhost.localdomain (c-24-21-54-107.hsd1.or.comcast.net. [24.21.54.107]) by mx.google.com with ESMTPS id dx17sm10914892pac.17.2013.02.28.16.44.16 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Feb 2013 16:44:16 -0800 (PST) From: John Stultz To: lkml Subject: [PATCH 24/30] staging: sync: Use proper barriers when waiting indefinitely Date: Thu, 28 Feb 2013 16:43:20 -0800 Message-Id: <1362098606-26469-25-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1362098606-26469-1-git-send-email-john.stultz@linaro.org> References: <1362098606-26469-1-git-send-email-john.stultz@linaro.org> X-Gm-Message-State: ALoCoQn3piBjzbw0sH6nBdaY7onQR99a52kK9WAbJk95vf6hi7duGjRwqMiwVz6hdV80Zi8Aauvk X-Mailman-Approved-At: Fri, 01 Mar 2013 04:21:20 -0800 Cc: Daniel Vetter , dri-devel@lists.freedesktop.org, Rob Clark , John Stultz , Greg KH , Android Kernel Team X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org From: Erik Gilling The previous fix only addressed waiting with a timeout. Cc: Maarten Lankhorst Cc: Erik Gilling Cc: Daniel Vetter Cc: Rob Clark Cc: Sumit Semwal Cc: Greg KH Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team Signed-off-by: Erik Gilling Signed-off-by: John Stultz --- drivers/staging/android/sync.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c index 889ca6e..811cf65 100644 --- a/drivers/staging/android/sync.c +++ b/drivers/staging/android/sync.c @@ -588,7 +588,8 @@ int sync_fence_wait(struct sync_fence *fence, long timeout) sync_fence_check(fence), timeout); } else if (timeout < 0) { - err = wait_event_interruptible(fence->wq, fence->status != 0); + err = wait_event_interruptible(fence->wq, + sync_fence_check(fence)); } if (err < 0)