From: Ville Syrjälä Date: Thu, 2 Nov 2017 20:03:36 +0000 (+0200) Subject: dma-buf: Use rcu_assign_pointer() to set rcu protected pointers X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=ad46d7b89371c5920abdcad1ed04fbae68c9c8a9;p=openwrt%2Fstaging%2Fblogic.git dma-buf: Use rcu_assign_pointer() to set rcu protected pointers Use rcu_assign_pointer() when setting an rcu protected pointer. This gets rid of another sparse warning. Cc: Dave Airlie Cc: Jason Ekstrand Cc: linaro-mm-sig@lists.linaro.org Cc: linux-media@vger.kernel.org Cc: Alex Deucher Cc: Christian König Cc: Sumit Semwal Cc: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171102200336.23347-5-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Reviewed-by: Christian König . Acked-by: Sumit Semwal --- diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c index b44d9d7db347..d90333e0b6d5 100644 --- a/drivers/dma-buf/reservation.c +++ b/drivers/dma-buf/reservation.c @@ -318,7 +318,7 @@ retry: continue; } - dst_list->shared[dst_list->shared_count++] = fence; + rcu_assign_pointer(dst_list->shared[dst_list->shared_count++], fence); } } else { dst_list = NULL;