Re: [PATCH v6 2/2] vhost-user: fix VirtQ notifier cleanup

2022-01-12 Thread Xueming(Steven) Li
On Tue, 2021-11-02 at 02:47 -0400, Michael S. Tsirkin wrote: > On Tue, Nov 02, 2021 at 06:00:58AM +, Xueming(Steven) Li wrote: > > On Mon, 2021-11-01 at 17:00 -0400, Michael S. Tsirkin wrote: > > > On Mon, Nov 01, 2021 at 04:38:13PM +0800, Xueming Li wrote: > > > > When vhost-user device cleanu

Re: [PATCH v6 2/2] vhost-user: fix VirtQ notifier cleanup

2021-11-01 Thread Michael S. Tsirkin
On Tue, Nov 02, 2021 at 06:00:58AM +, Xueming(Steven) Li wrote: > On Mon, 2021-11-01 at 17:00 -0400, Michael S. Tsirkin wrote: > > On Mon, Nov 01, 2021 at 04:38:13PM +0800, Xueming Li wrote: > > > When vhost-user device cleanup is executed and un-mmaps notifier > > > address, VM cpu thread writ

Re: [PATCH v6 2/2] vhost-user: fix VirtQ notifier cleanup

2021-11-01 Thread Xueming(Steven) Li
On Mon, 2021-11-01 at 17:00 -0400, Michael S. Tsirkin wrote: > On Mon, Nov 01, 2021 at 04:38:13PM +0800, Xueming Li wrote: > > When vhost-user device cleanup is executed and un-mmaps notifier > > address, VM cpu thread writing the notifier fails by accessing invalid > > address error. > > > > To a

Re: [PATCH v6 2/2] vhost-user: fix VirtQ notifier cleanup

2021-11-01 Thread Michael S. Tsirkin
On Mon, Nov 01, 2021 at 04:38:13PM +0800, Xueming Li wrote: > When vhost-user device cleanup is executed and un-mmaps notifier > address, VM cpu thread writing the notifier fails by accessing invalid > address error. > > To avoid this concurrent issue, call RCU and wait for a memory flatview > upd

[PATCH v6 2/2] vhost-user: fix VirtQ notifier cleanup

2021-11-01 Thread Xueming Li
When vhost-user device cleanup is executed and un-mmaps notifier address, VM cpu thread writing the notifier fails by accessing invalid address error. To avoid this concurrent issue, call RCU and wait for a memory flatview update, then un-mmap notifiers in callback. Fixes: 44866521bd6e ("vhost-us