summaryrefslogtreecommitdiffstats
path: root/drivers/dma-buf/fence.c
diff options
context:
space:
mode:
authorMaarten Lankhorst2014-07-01 12:58:00 +0200
committerGreg Kroah-Hartman2014-07-08 22:41:08 +0200
commit3c3b177a9369b26890ced004867fb32708e8ef5b (patch)
treed7f1840cd62b8c0d427ea56b203485c2e27bb29e /drivers/dma-buf/fence.c
parentreservation: update api and add some helpers (diff)
downloadkernel-qcow2-linux-3c3b177a9369b26890ced004867fb32708e8ef5b.tar.gz
kernel-qcow2-linux-3c3b177a9369b26890ced004867fb32708e8ef5b.tar.xz
kernel-qcow2-linux-3c3b177a9369b26890ced004867fb32708e8ef5b.zip
reservation: add suppport for read-only access using rcu
This adds some extra functions to deal with rcu. reservation_object_get_fences_rcu() will obtain the list of shared and exclusive fences without obtaining the ww_mutex. reservation_object_wait_timeout_rcu() will wait on all fences of the reservation_object, without obtaining the ww_mutex. reservation_object_test_signaled_rcu() will test if all fences of the reservation_object are signaled without using the ww_mutex. reservation_object_get_excl and reservation_object_get_list require the reservation object to be held, updating requires write_seqcount_begin/end. If only the exclusive fence is needed, rcu_dereference followed by fence_get_rcu can be used, if the shared fences are needed it's recommended to use the supplied functions. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Acked-by: Sumit Semwal <sumit.semwal@linaro.org> Acked-by: Daniel Vetter <daniel@ffwll.ch> Reviewed-By: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/dma-buf/fence.c')
-rw-r--r--drivers/dma-buf/fence.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma-buf/fence.c b/drivers/dma-buf/fence.c
index 948bf00d955e..4222cb2aa96a 100644
--- a/drivers/dma-buf/fence.c
+++ b/drivers/dma-buf/fence.c
@@ -184,7 +184,7 @@ EXPORT_SYMBOL(fence_release);
void fence_free(struct fence *fence)
{
- kfree(fence);
+ kfree_rcu(fence, rcu);
}
EXPORT_SYMBOL(fence_free);