projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
783e398
)
vhost-net: remove unlocked use of receive_queue
author
Michael S. Tsirkin
<mst@redhat.com>
Sun, 13 Mar 2011 21:00:52 +0000
(23:00 +0200)
committer
Michael S. Tsirkin
<mst@redhat.com>
Sun, 13 Mar 2011 21:08:19 +0000
(23:08 +0200)
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>
drivers/vhost/net.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/vhost/net.c
b/drivers/vhost/net.c
index 57203014c457771ba013f0c679d0ac910f298674..2f7c76a85e532a658bf9652b0875887346ff374c 100644
(file)
--- a/
drivers/vhost/net.c
+++ b/
drivers/vhost/net.c
@@
-311,7
+311,7
@@
static void handle_rx(struct vhost_net *net)
/* TODO: check that we are running from vhost_worker? */
struct socket *sock = rcu_dereference_check(vq->private_data, 1);
- if (!sock
|| skb_queue_empty(&sock->sk->sk_receive_queue)
)
+ if (!sock)
return;
mutex_lock(&vq->mutex);