Re: [PATCH v4 3/5] vsock/virtio: fix locking in virtio_transport_inc_tx_pkt()

2019-07-22 Thread Stefan Hajnoczi
On Wed, Jul 17, 2019 at 01:30:28PM +0200, Stefano Garzarella wrote: > fwd_cnt and last_fwd_cnt are protected by rx_lock, so we should use > the same spinlock also if we are in the TX path. > > Move also buf_alloc under the same lock. > > Signed-off-by: Stefano Garzarella > --- >

Re: [PATCH v4 3/5] vsock/virtio: fix locking in virtio_transport_inc_tx_pkt()

2019-07-18 Thread Stefano Garzarella
On Wed, Jul 17, 2019 at 4:51 PM Michael S. Tsirkin wrote: > > On Wed, Jul 17, 2019 at 01:30:28PM +0200, Stefano Garzarella wrote: > > fwd_cnt and last_fwd_cnt are protected by rx_lock, so we should use > > the same spinlock also if we are in the TX path. > > > > Move also buf_alloc under the same

Re: [PATCH v4 3/5] vsock/virtio: fix locking in virtio_transport_inc_tx_pkt()

2019-07-17 Thread Michael S. Tsirkin
On Wed, Jul 17, 2019 at 01:30:28PM +0200, Stefano Garzarella wrote: > fwd_cnt and last_fwd_cnt are protected by rx_lock, so we should use > the same spinlock also if we are in the TX path. > > Move also buf_alloc under the same lock. > > Signed-off-by: Stefano Garzarella Wait a second is this

[PATCH v4 3/5] vsock/virtio: fix locking in virtio_transport_inc_tx_pkt()

2019-07-17 Thread Stefano Garzarella
fwd_cnt and last_fwd_cnt are protected by rx_lock, so we should use the same spinlock also if we are in the TX path. Move also buf_alloc under the same lock. Signed-off-by: Stefano Garzarella --- include/linux/virtio_vsock.h| 2 +- net/vmw_vsock/virtio_transport_common.c | 4 ++--