diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2010-11-14 17:31:52 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2010-11-25 11:29:16 +0200 |
commit | 11cd1a8b8cad1acfc140d9acce93762a9c140b20 (patch) | |
tree | 7714d74c5525950d73ed7e2f80f687a8b62ed85f | |
parent | a27e13d370415add3487949c60810e36069a23a6 (diff) | |
download | op-kernel-dev-11cd1a8b8cad1acfc140d9acce93762a9c140b20.zip op-kernel-dev-11cd1a8b8cad1acfc140d9acce93762a9c140b20.tar.gz |
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>
-rw-r--r-- | drivers/vhost/net.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 4b4da5b..f442668 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; |