Re: [PATCH 2/6] libvhost-user: Use slave_mutex in all slave messages

2021-01-28 Thread Greg Kurz
On Thu, 28 Jan 2021 09:48:35 -0500 Vivek Goyal wrote: > On Thu, Jan 28, 2021 at 03:31:23PM +0100, Greg Kurz wrote: > > On Mon, 25 Jan 2021 13:01:11 -0500 > > Vivek Goyal wrote: > > > > > dev->slave_mutex needs to be taken when sending messages on slave_fd. > > > Currently _vu_queue_notify() doe

Re: [PATCH 2/6] libvhost-user: Use slave_mutex in all slave messages

2021-01-28 Thread Vivek Goyal
On Thu, Jan 28, 2021 at 03:31:23PM +0100, Greg Kurz wrote: > On Mon, 25 Jan 2021 13:01:11 -0500 > Vivek Goyal wrote: > > > dev->slave_mutex needs to be taken when sending messages on slave_fd. > > Currently _vu_queue_notify() does not do that. > > > > Introduce a helper vu_message_slave_send_rec

Re: [PATCH 2/6] libvhost-user: Use slave_mutex in all slave messages

2021-01-28 Thread Greg Kurz
On Mon, 25 Jan 2021 13:01:11 -0500 Vivek Goyal wrote: > dev->slave_mutex needs to be taken when sending messages on slave_fd. > Currently _vu_queue_notify() does not do that. > > Introduce a helper vu_message_slave_send_receive() which sends as well > as receive response. Use this helper in all

[PATCH 2/6] libvhost-user: Use slave_mutex in all slave messages

2021-01-25 Thread Vivek Goyal
dev->slave_mutex needs to be taken when sending messages on slave_fd. Currently _vu_queue_notify() does not do that. Introduce a helper vu_message_slave_send_receive() which sends as well as receive response. Use this helper in all the paths which send message on slave_fd channel. Signed-off-by: