diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2010-11-14 10:31:52 -0500 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2010-11-25 04:29:16 -0500 |
commit | 11cd1a8b8cad1acfc140d9acce93762a9c140b20 (patch) | |
tree | 7714d74c5525950d73ed7e2f80f687a8b62ed85f /drivers/vhost | |
parent | a27e13d370415add3487949c60810e36069a23a6 (diff) |
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.c | 5 |
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) | |||
129 | size_t hdr_size; | 129 | size_t hdr_size; |
130 | struct socket *sock; | 130 | struct socket *sock; |
131 | 131 | ||
132 | sock = rcu_dereference_check(vq->private_data, | 132 | /* TODO: check that we are running from vhost_worker? |
133 | lockdep_is_held(&vq->mutex)); | 133 | * Not sure it's worth it, it's straight-forward enough. */ |
134 | sock = rcu_dereference_check(vq->private_data, 1); | ||
134 | if (!sock) | 135 | if (!sock) |
135 | return; | 136 | return; |
136 | 137 | ||