LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] vhost: rcu annotation fixup
@ 2011-01-18 11:08 Michael S. Tsirkin
  2011-01-18 17:48 ` Paul E. McKenney
  2011-01-19  0:40 ` Mel Gorman
  0 siblings, 2 replies; 8+ messages in thread
From: Michael S. Tsirkin @ 2011-01-18 11:08 UTC (permalink / raw)
  To: Jason Wang, kvm, virtualization, netdev, linux-kernel

When built with rcu checks enabled, vhost triggers
bogus warnings as vhost features are read without
dev->mutex sometimes.
Fixing it properly is not trivial as vhost.h does not
know which lockdep classes it will be used under.
Disable the warning by stubbing out the check for now.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 drivers/vhost/vhost.h |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index 2af44b7..2d03a31 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -173,9 +173,7 @@ static inline int vhost_has_feature(struct vhost_dev *dev, int bit)
 {
 	unsigned acked_features;
 
-	acked_features =
-		rcu_dereference_index_check(dev->acked_features,
-					    lockdep_is_held(&dev->mutex));
+	acked_features = rcu_dereference_index_check(dev->acked_features, 1);
 	return acked_features & (1 << bit);
 }
 
-- 
1.7.3.2.91.g446ac

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-01-19  5:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-18 11:08 [PATCH] vhost: rcu annotation fixup Michael S. Tsirkin
2011-01-18 17:48 ` Paul E. McKenney
2011-01-18 17:55   ` Michael S. Tsirkin
2011-01-18 19:02     ` Paul E. McKenney
2011-01-18 20:10       ` Michael S. Tsirkin
2011-01-18 20:28         ` Paul E. McKenney
2011-01-19  0:40 ` Mel Gorman
2011-01-19  5:18   ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).