From 5f16ba5ab48610cb242e8d98fcf42ce2261b8307 Mon Sep 17 00:00:00 2001 From: Aaron Taylor Date: Fri, 30 Apr 2021 14:14:40 -0700 Subject: [PATCH] Updated host/vhost/vhost.h to use READ_ONCE() macro instead of ACCESS_ONCE(). See also: - https://github.com/torvalds/linux/commit/b899a850431e2dd0943205a63a68573f3e312d0d --- host/vhost/vhost.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/host/vhost/vhost.h b/host/vhost/vhost.h index 9bb1653..c478391 100644 --- a/host/vhost/vhost.h +++ b/host/vhost/vhost.h @@ -206,20 +206,9 @@ int vhost_zerocopy_signal_used(struct vhost_virtqueue *vq); } while (0) #ifndef __rcu_dereference_index_check -#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0)) #define __rcu_dereference_index_check(p, c) \ ({ \ - typeof(p) _________p1 = ACCESS_ONCE(p); \ - rcu_lockdep_assert(c, \ - "suspicious rcu_dereference_index_check()" \ - " usage"); \ - smp_read_barrier_depends(); \ - (_________p1); \ - }) -#else -#define __rcu_dereference_index_check(p, c) \ - ({ \ - typeof(p) _________p1 = ACCESS_ONCE(p); \ + typeof(p) _________p1 = READ_ONCE(p); \ RCU_LOCKDEP_WARN(c, \ "suspicious rcu_dereference_index_check()" \ " usage"); \ @@ -227,7 +216,6 @@ int vhost_zerocopy_signal_used(struct vhost_virtqueue *vq); (_________p1); \ }) #endif -#endif enum { VHOST_FEATURES = (1ULL << VIRTIO_F_NOTIFY_ON_EMPTY) | -- 2.20.1