diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2011-01-18 06:04:43 -0500 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2011-02-01 09:48:46 -0500 |
commit | 5e18247b02d60a1ea4bf98c05e139461ca9aec64 (patch) | |
tree | ccb92d5f599413e138fd148594c04d9f3aa43701 /drivers/vhost/vhost.h | |
parent | fca540ab5f4718c6133f71f7be1793066008bf89 (diff) |
vhost: rcu annotation fixup
When built with rcu checks enabled, vhost triggers
bogus warnings as vhost features are read without
dev->mutex sometimes, and private pointer is read
with our kind of rcu where work serves as a
read side critical section.
Fixing it properly is not trivial.
Disable the warnings by stubbing out the checks for now.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost/vhost.h')
-rw-r--r-- | drivers/vhost/vhost.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 2af44b7b1f3f..b3363ae38518 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h | |||
@@ -173,9 +173,9 @@ static inline int vhost_has_feature(struct vhost_dev *dev, int bit) | |||
173 | { | 173 | { |
174 | unsigned acked_features; | 174 | unsigned acked_features; |
175 | 175 | ||
176 | acked_features = | 176 | /* TODO: check that we are running from vhost_worker or dev mutex is |
177 | rcu_dereference_index_check(dev->acked_features, | 177 | * held? */ |
178 | lockdep_is_held(&dev->mutex)); | 178 | acked_features = rcu_dereference_index_check(dev->acked_features, 1); |
179 | return acked_features & (1 << bit); | 179 | return acked_features & (1 << bit); |
180 | } | 180 | } |
181 | 181 | ||