summaryrefslogtreecommitdiffstats
path: root/drivers/vhost/net.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-21 10:46:08 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-21 10:46:08 -0500
commitcd6a22310ec2a70092e136d0cd65bb77c1502521 (patch)
treec01fa788b27b240c7b426d7f329d92bd58c7b8f5 /drivers/vhost/net.c
parent1e12a521d6917004f8b95a3b5864b92edc2694c8 (diff)
parent177c459b08a34dcf004aa9a4c1f1d8be682ff3af (diff)
Merge USB 4.20-rc8 mergepoint into usb-next
We need the USB changes in here for additional patches to be able to apply cleanly. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/vhost/net.c')
-rw-r--r--drivers/vhost/net.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index ab11b2bee273..ad7a6f475a44 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -513,7 +513,13 @@ static void vhost_net_busy_poll(struct vhost_net *net,
513 struct socket *sock; 513 struct socket *sock;
514 struct vhost_virtqueue *vq = poll_rx ? tvq : rvq; 514 struct vhost_virtqueue *vq = poll_rx ? tvq : rvq;
515 515
516 mutex_lock_nested(&vq->mutex, poll_rx ? VHOST_NET_VQ_TX: VHOST_NET_VQ_RX); 516 /* Try to hold the vq mutex of the paired virtqueue. We can't
517 * use mutex_lock() here since we could not guarantee a
518 * consistenet lock ordering.
519 */
520 if (!mutex_trylock(&vq->mutex))
521 return;
522
517 vhost_disable_notify(&net->dev, vq); 523 vhost_disable_notify(&net->dev, vq);
518 sock = rvq->private_data; 524 sock = rvq->private_data;
519 525