Re: [PATCH net V2] vhost: correctly remove wait queue during poll failure

2018-03-29 Thread Jason Wang
On 2018年03月29日 12:20, Michael S. Tsirkin wrote: On Tue, Mar 27, 2018 at 08:50:52PM +0800, Jason Wang wrote: We tried to remove vq poll from wait queue, but do not check whether or not it was in a list before. This will lead double free. Fixing this by switching to use vhost_poll_stop() which

Re: [PATCH net V2] vhost: correctly remove wait queue during poll failure

2018-03-29 Thread Jason Wang
On 2018年03月29日 12:20, Michael S. Tsirkin wrote: On Tue, Mar 27, 2018 at 08:50:52PM +0800, Jason Wang wrote: We tried to remove vq poll from wait queue, but do not check whether or not it was in a list before. This will lead double free. Fixing this by switching to use vhost_poll_stop() which

Re: [PATCH net V2] vhost: correctly remove wait queue during poll failure

2018-03-28 Thread Michael S. Tsirkin
On Tue, Mar 27, 2018 at 08:50:52PM +0800, Jason Wang wrote: > We tried to remove vq poll from wait queue, but do not check whether > or not it was in a list before. This will lead double free. Fixing > this by switching to use vhost_poll_stop() which zeros poll->wqh after > removing poll from

Re: [PATCH net V2] vhost: correctly remove wait queue during poll failure

2018-03-28 Thread Michael S. Tsirkin
On Tue, Mar 27, 2018 at 08:50:52PM +0800, Jason Wang wrote: > We tried to remove vq poll from wait queue, but do not check whether > or not it was in a list before. This will lead double free. Fixing > this by switching to use vhost_poll_stop() which zeros poll->wqh after > removing poll from

Re: [PATCH net V2] vhost: correctly remove wait queue during poll failure

2018-03-27 Thread David Miller
From: Jason Wang Date: Tue, 27 Mar 2018 20:50:52 +0800 > We tried to remove vq poll from wait queue, but do not check whether > or not it was in a list before. This will lead double free. Fixing > this by switching to use vhost_poll_stop() which zeros poll->wqh after >

Re: [PATCH net V2] vhost: correctly remove wait queue during poll failure

2018-03-27 Thread David Miller
From: Jason Wang Date: Tue, 27 Mar 2018 20:50:52 +0800 > We tried to remove vq poll from wait queue, but do not check whether > or not it was in a list before. This will lead double free. Fixing > this by switching to use vhost_poll_stop() which zeros poll->wqh after > removing poll from

Re: [PATCH net V2] vhost: correctly remove wait queue during poll failure

2018-03-27 Thread Michael S. Tsirkin
On Tue, Mar 27, 2018 at 08:50:52PM +0800, Jason Wang wrote: > We tried to remove vq poll from wait queue, but do not check whether > or not it was in a list before. This will lead double free. Fixing > this by switching to use vhost_poll_stop() which zeros poll->wqh after > removing poll from

Re: [PATCH net V2] vhost: correctly remove wait queue during poll failure

2018-03-27 Thread Michael S. Tsirkin
On Tue, Mar 27, 2018 at 08:50:52PM +0800, Jason Wang wrote: > We tried to remove vq poll from wait queue, but do not check whether > or not it was in a list before. This will lead double free. Fixing > this by switching to use vhost_poll_stop() which zeros poll->wqh after > removing poll from

Re: [PATCH net V2] vhost: correctly remove wait queue during poll failure

2018-03-27 Thread Darren Kenny
On Tue, Mar 27, 2018 at 08:50:52PM +0800, Jason Wang wrote: We tried to remove vq poll from wait queue, but do not check whether or not it was in a list before. This will lead double free. Fixing this by switching to use vhost_poll_stop() which zeros poll->wqh after removing poll from waitqueue

Re: [PATCH net V2] vhost: correctly remove wait queue during poll failure

2018-03-27 Thread Darren Kenny
On Tue, Mar 27, 2018 at 08:50:52PM +0800, Jason Wang wrote: We tried to remove vq poll from wait queue, but do not check whether or not it was in a list before. This will lead double free. Fixing this by switching to use vhost_poll_stop() which zeros poll->wqh after removing poll from waitqueue

[PATCH net V2] vhost: correctly remove wait queue during poll failure

2018-03-27 Thread Jason Wang
We tried to remove vq poll from wait queue, but do not check whether or not it was in a list before. This will lead double free. Fixing this by switching to use vhost_poll_stop() which zeros poll->wqh after removing poll from waitqueue to make sure it won't be freed twice. Cc: Darren Kenny

[PATCH net V2] vhost: correctly remove wait queue during poll failure

2018-03-27 Thread Jason Wang
We tried to remove vq poll from wait queue, but do not check whether or not it was in a list before. This will lead double free. Fixing this by switching to use vhost_poll_stop() which zeros poll->wqh after removing poll from waitqueue to make sure it won't be freed twice. Cc: Darren Kenny