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: 15180 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id BDC3023E1A for ; Fri, 1 Mar 2013 00:44:19 +0000 (UTC) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by fiordland.canonical.com (Postfix) with ESMTP id 73DFFA1935F for ; Fri, 1 Mar 2013 00:44:19 +0000 (UTC) Received: by mail-ve0-f169.google.com with SMTP id 15so2415210vea.14 for ; Thu, 28 Feb 2013 16:44:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=fTOYLT1mmccjJ/L2F4pxYGC0YSlzuBFudShoRYnhFB4=; b=Vzg/V9qlW/ijmQ4QYyBFN9w3Vo66HjZoOgrUJK3RQgbUNzl8rGd82m7+R0Hyr88Tas m6gYOFDhSZHWHPYj9D5sGctyhbunr7h1zBgSIj/ipMAtO7euG8KRMKMPDAIqgSTd4QE+ ghgnYhyC+xwi4JrCsJiNYEwYGn00t/ZmYu+T2RQTviP0Ex4KafMkjqPip+Boc2GuBeWw C1wn2t7f4sxeDCD7DHG7Uhvvb1adyYz3mV1GxQhccBqTg6IAtMUURmzU7jeiwmNUHpvY RBC5eau0wjnkN6rmSGvxhF3DM4PZE8FW/mhAMja49jW2RvyWRYUsjJGIeqNEmM011KOi T8RQ== X-Received: by 10.52.29.18 with SMTP id f18mr2892993vdh.57.1362098659018; Thu, 28 Feb 2013 16:44:19 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp669veb; Thu, 28 Feb 2013 16:44:18 -0800 (PST) X-Received: by 10.66.102.73 with SMTP id fm9mr15609600pab.195.1362098658120; Thu, 28 Feb 2013 16:44:18 -0800 (PST) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by mx.google.com with ESMTPS id bu4si4652828pab.61.2013.02.28.16.44.17 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Feb 2013 16:44:18 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.53 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.160.53; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.53 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) smtp.mail=john.stultz@linaro.org Received: by mail-pb0-f53.google.com with SMTP id un1so1380419pbc.26 for ; Thu, 28 Feb 2013 16:44:17 -0800 (PST) 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 Cc: Erik Gilling , Maarten Lankhorst , Daniel Vetter , Rob Clark , Sumit Semwal , Greg KH , dri-devel@lists.freedesktop.org, Android Kernel Team , John Stultz 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: ALoCoQlsvQ8b0ZqoDGYYbc3ysIDAe2eGX7cjUxxyAMpRrEyBjsZ9lC0+P4B69zaXCYH7bFxCNTkP 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)