[PATCH 2/4] dma-buf/fence: Sparse wants __rcu on the object itself

Ville Syrjala ville.syrjala at linux.intel.com
Thu Nov 2 20:03:34 UTC 2017


From: Chris Wilson <chris at chris-wilson.co.uk>

In order to silent sparse in dma_fence_get_rcu_safe(), we need to mark
the incoming fence object as being RCU protected and not the pointer to
the object.

Cc: Dave Airlie <airlied at redhat.com>
Cc: Jason Ekstrand <jason at jlekstrand.net>
Cc: linaro-mm-sig at lists.linaro.org
Cc: linux-media at vger.kernel.org
Cc: Alex Deucher <alexander.deucher at amd.com>
Cc: Christian König <christian.koenig at amd.com>
Cc: Sumit Semwal <sumit.semwal at linaro.org>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 include/linux/dma-fence.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h
index efdabbb64e3c..4c008170fe65 100644
--- a/include/linux/dma-fence.h
+++ b/include/linux/dma-fence.h
@@ -242,7 +242,7 @@ static inline struct dma_fence *dma_fence_get_rcu(struct dma_fence *fence)
  * The caller is required to hold the RCU read lock.
  */
 static inline struct dma_fence *
-dma_fence_get_rcu_safe(struct dma_fence * __rcu *fencep)
+dma_fence_get_rcu_safe(struct dma_fence __rcu **fencep)
 {
 	do {
 		struct dma_fence *fence;
-- 
2.13.6



More information about the dri-devel mailing list