summaryrefslogtreecommitdiff
path: root/drivers/vhost
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-11-14 17:31:52 +0200
committerMichael S. Tsirkin <mst@redhat.com>2010-11-25 11:29:16 +0200
commit11cd1a8b8cad1acfc140d9acce93762a9c140b20 (patch)
tree7714d74c5525950d73ed7e2f80f687a8b62ed85f /drivers/vhost
parenta27e13d370415add3487949c60810e36069a23a6 (diff)
downloadlwn-11cd1a8b8cad1acfc140d9acce93762a9c140b20.tar.gz
lwn-11cd1a8b8cad1acfc140d9acce93762a9c140b20.zip
vhost/net: fix rcu check usage
Incorrect rcu check was used as rcu isn't done under mutex here. Force check to 1 for now, to stop it from complaining. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost')
-rw-r--r--drivers/vhost/net.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 4b4da5b86ff9..f442668a1e52 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -129,8 +129,9 @@ static void handle_tx(struct vhost_net *net)
size_t hdr_size;
struct socket *sock;
- sock = rcu_dereference_check(vq->private_data,
- lockdep_is_held(&vq->mutex));
+ /* TODO: check that we are running from vhost_worker?
+ * Not sure it's worth it, it's straight-forward enough. */
+ sock = rcu_dereference_check(vq->private_data, 1);
if (!sock)
return;