diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2011-03-13 17:00:52 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2011-03-13 17:08:19 -0400 |
commit | de4d768a428d9de943dd6dc82bcd61742955cb6e (patch) | |
tree | 68b0d3c4b3ce4158664e65c2deb9bf59d3a5e028 /drivers/vhost/net.c | |
parent | 783e3988544b94ff3918666b9f36866ac547fba1 (diff) |
vhost-net: remove unlocked use of receive_queue
Use of skb_queue_empty(&sock->sk->sk_receive_queue)
without taking the sk_receive_queue.lock is unsafe
or useless. Take it out.
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost/net.c')
-rw-r--r-- | drivers/vhost/net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 57203014c457..2f7c76a85e53 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c | |||
@@ -311,7 +311,7 @@ static void handle_rx(struct vhost_net *net) | |||
311 | /* TODO: check that we are running from vhost_worker? */ | 311 | /* TODO: check that we are running from vhost_worker? */ |
312 | struct socket *sock = rcu_dereference_check(vq->private_data, 1); | 312 | struct socket *sock = rcu_dereference_check(vq->private_data, 1); |
313 | 313 | ||
314 | if (!sock || skb_queue_empty(&sock->sk->sk_receive_queue)) | 314 | if (!sock) |
315 | return; | 315 | return; |
316 | 316 | ||
317 | mutex_lock(&vq->mutex); | 317 | mutex_lock(&vq->mutex); |