Skip to content

Commit de4d768

Browse files
committed
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>
1 parent 783e398 commit de4d768

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/vhost/net.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ static void handle_rx(struct vhost_net *net)
311311
/* TODO: check that we are running from vhost_worker? */
312312
struct socket *sock = rcu_dereference_check(vq->private_data, 1);
313313

314-
if (!sock || skb_queue_empty(&sock->sk->sk_receive_queue))
314+
if (!sock)
315315
return;
316316

317317
mutex_lock(&vq->mutex);

0 commit comments

Comments
 (0)