On Sun, Jun 02, 2019 at 06:03:34PM -0700, David Miller wrote:
> From: Stefano Garzarella
> Date: Fri, 31 May 2019 15:39:51 +0200
>
> > @@ -434,7 +434,9 @@ void virtio_transport_set_buffer_size(struct vsock_sock
> > *vsk, u64 val)
> > if (val > vvs->buf_size_max)
> > vvs->buf_size
From: Stefano Garzarella
Date: Fri, 31 May 2019 15:39:51 +0200
> @@ -434,7 +434,9 @@ void virtio_transport_set_buffer_size(struct vsock_sock
> *vsk, u64 val)
> if (val > vvs->buf_size_max)
> vvs->buf_size_max = val;
> vvs->buf_size = val;
> + spin_lock_bh(&vvs->rx_l
fwd_cnt is written with rx_lock, so we should read it using
the same spinlock also if we are in the TX path.
Move also buf_alloc under rx_lock and add a missing locking
when we modify it.
Signed-off-by: Stefano Garzarella
---
include/linux/virtio_vsock.h| 2 +-
net/vmw_vsock/virtio_