Re: [PATCH] vhost: Use mutex to protect vq_irq setup

2020-10-29 Thread Michael S. Tsirkin
On Thu, Oct 29, 2020 at 09:37:17AM +0200, Eli Cohen wrote: > On Thu, Oct 29, 2020 at 03:03:24PM +0800, Jason Wang wrote: > > > > On 2020/10/28 下午10:20, Eli Cohen wrote: > > > Both irq_bypass_register_producer() and irq_bypass_unregister_producer() > > > require process context to run. Change the c

Re: [PATCH] vhost: Use mutex to protect vq_irq setup

2020-10-29 Thread Eli Cohen
On Thu, Oct 29, 2020 at 04:08:24PM +0800, Jason Wang wrote: > > On 2020/10/29 下午3:50, Eli Cohen wrote: > > On Thu, Oct 29, 2020 at 03:39:24PM +0800, Jason Wang wrote: > > > On 2020/10/29 下午3:37, Eli Cohen wrote: > > > > On Thu, Oct 29, 2020 at 03:03:24PM +0800, Jason Wang wrote: > > > > > On 2020/

Re: [PATCH] vhost: Use mutex to protect vq_irq setup

2020-10-29 Thread Jason Wang
On 2020/10/29 下午3:50, Eli Cohen wrote: On Thu, Oct 29, 2020 at 03:39:24PM +0800, Jason Wang wrote: On 2020/10/29 下午3:37, Eli Cohen wrote: On Thu, Oct 29, 2020 at 03:03:24PM +0800, Jason Wang wrote: On 2020/10/28 下午10:20, Eli Cohen wrote: Both irq_bypass_register_producer() and irq_bypass_un

Re: [PATCH] vhost: Use mutex to protect vq_irq setup

2020-10-29 Thread Eli Cohen
On Thu, Oct 29, 2020 at 03:39:24PM +0800, Jason Wang wrote: > > On 2020/10/29 下午3:37, Eli Cohen wrote: > > On Thu, Oct 29, 2020 at 03:03:24PM +0800, Jason Wang wrote: > > > On 2020/10/28 下午10:20, Eli Cohen wrote: > > > > Both irq_bypass_register_producer() and irq_bypass_unregister_producer() > >

Re: [PATCH] vhost: Use mutex to protect vq_irq setup

2020-10-29 Thread Jason Wang
On 2020/10/29 下午3:37, Eli Cohen wrote: On Thu, Oct 29, 2020 at 03:03:24PM +0800, Jason Wang wrote: On 2020/10/28 下午10:20, Eli Cohen wrote: Both irq_bypass_register_producer() and irq_bypass_unregister_producer() require process context to run. Change the call context lock from spinlock to mut

Re: [PATCH] vhost: Use mutex to protect vq_irq setup

2020-10-29 Thread Eli Cohen
On Thu, Oct 29, 2020 at 03:03:24PM +0800, Jason Wang wrote: > > On 2020/10/28 下午10:20, Eli Cohen wrote: > > Both irq_bypass_register_producer() and irq_bypass_unregister_producer() > > require process context to run. Change the call context lock from > > spinlock to mutex to protect the setup proc

Re: [PATCH] vhost: Use mutex to protect vq_irq setup

2020-10-29 Thread Jason Wang
On 2020/10/28 下午10:20, Eli Cohen wrote: Both irq_bypass_register_producer() and irq_bypass_unregister_producer() require process context to run. Change the call context lock from spinlock to mutex to protect the setup process to avoid deadlocks. Fixes: 265a0ad8731d ("vhost: introduce vhost_vri

[PATCH] vhost: Use mutex to protect vq_irq setup

2020-10-28 Thread Eli Cohen
Both irq_bypass_register_producer() and irq_bypass_unregister_producer() require process context to run. Change the call context lock from spinlock to mutex to protect the setup process to avoid deadlocks. Fixes: 265a0ad8731d ("vhost: introduce vhost_vring_call") Signed-off-by: Eli Cohen --- dri