tegra: video: host: fix race condition in hostintr wait list

Change-Id: I5e58f5fe8935741441e2b30f585bb997b6317d3d
Author: Alex Frid <afrid@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
This commit is contained in:
Varun Wadekar
2010-11-23 20:03:02 +05:30
committed by Erik Gilling
parent bad2e94f96
commit c6b65e02b3

View File

@@ -178,8 +178,7 @@ static void run_handlers(struct list_head completed[NVHOST_INTR_ACTION_COUNT])
list_for_each_entry_safe(waiter, next, head, list) {
list_del(&waiter->list);
handler(waiter);
atomic_set(&waiter->state, WLS_HANDLED);
smp_wmb();
WARN_ON(atomic_xchg(&waiter->state, WLS_HANDLED) != WLS_REMOVED);
kref_put(&waiter->refcount, waiter_release);
}
}