summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-11-14 16:31:52 +0100
committerMichael S. Tsirkin <mst@redhat.com>2010-11-25 10:29:16 +0100
commit11cd1a8b8cad1acfc140d9acce93762a9c140b20 (patch)
tree7714d74c5525950d73ed7e2f80f687a8b62ed85f /drivers
parenteconet: fix CVE-2010-3848 (diff)
downloadlinux-11cd1a8b8cad1acfc140d9acce93762a9c140b20.tar.xz
linux-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')
-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;