Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-14 Thread Michael S. Tsirkin
On Mon, Jan 14, 2013 at 03:37:58PM +0800, Jason Wang wrote: > On 01/14/2013 02:57 PM, Michael S. Tsirkin wrote: > > On Mon, Jan 14, 2013 at 10:59:02AM +0800, Jason Wang wrote: > >> On 01/13/2013 07:10 PM, Michael S. Tsirkin wrote: > >>> On Mon, Jan 07, 2013 at 11:04:32PM +0800, Jason Wang wrote: >

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-14 Thread Michael S. Tsirkin
On Mon, Jan 14, 2013 at 03:37:58PM +0800, Jason Wang wrote: On 01/14/2013 02:57 PM, Michael S. Tsirkin wrote: On Mon, Jan 14, 2013 at 10:59:02AM +0800, Jason Wang wrote: On 01/13/2013 07:10 PM, Michael S. Tsirkin wrote: On Mon, Jan 07, 2013 at 11:04:32PM +0800, Jason Wang wrote: On

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-13 Thread Jason Wang
On 01/14/2013 02:57 PM, Michael S. Tsirkin wrote: > On Mon, Jan 14, 2013 at 10:59:02AM +0800, Jason Wang wrote: >> On 01/13/2013 07:10 PM, Michael S. Tsirkin wrote: >>> On Mon, Jan 07, 2013 at 11:04:32PM +0800, Jason Wang wrote: On 01/07/2013 10:55 PM, Michael S. Tsirkin wrote: > On Mon,

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-13 Thread Michael S. Tsirkin
On Mon, Jan 14, 2013 at 10:59:02AM +0800, Jason Wang wrote: > On 01/13/2013 07:10 PM, Michael S. Tsirkin wrote: > > On Mon, Jan 07, 2013 at 11:04:32PM +0800, Jason Wang wrote: > >> On 01/07/2013 10:55 PM, Michael S. Tsirkin wrote: > >>> On Mon, Jan 07, 2013 at 12:38:17PM +0800, Jason Wang wrote: >

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-13 Thread Jason Wang
On 01/13/2013 07:10 PM, Michael S. Tsirkin wrote: > On Mon, Jan 07, 2013 at 11:04:32PM +0800, Jason Wang wrote: >> On 01/07/2013 10:55 PM, Michael S. Tsirkin wrote: >>> On Mon, Jan 07, 2013 at 12:38:17PM +0800, Jason Wang wrote: On 01/06/2013 09:22 PM, Michael S. Tsirkin wrote: > On Sun,

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-13 Thread Michael S. Tsirkin
On Mon, Jan 07, 2013 at 11:04:32PM +0800, Jason Wang wrote: > On 01/07/2013 10:55 PM, Michael S. Tsirkin wrote: > > On Mon, Jan 07, 2013 at 12:38:17PM +0800, Jason Wang wrote: > >> On 01/06/2013 09:22 PM, Michael S. Tsirkin wrote: > >>> On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: >

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-13 Thread Michael S. Tsirkin
On Mon, Jan 07, 2013 at 11:04:32PM +0800, Jason Wang wrote: > On 01/07/2013 10:55 PM, Michael S. Tsirkin wrote: > > On Mon, Jan 07, 2013 at 12:38:17PM +0800, Jason Wang wrote: > >> On 01/06/2013 09:22 PM, Michael S. Tsirkin wrote: > >>> On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: >

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-13 Thread Michael S. Tsirkin
On Mon, Jan 07, 2013 at 11:04:32PM +0800, Jason Wang wrote: On 01/07/2013 10:55 PM, Michael S. Tsirkin wrote: On Mon, Jan 07, 2013 at 12:38:17PM +0800, Jason Wang wrote: On 01/06/2013 09:22 PM, Michael S. Tsirkin wrote: On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: Polling

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-13 Thread Michael S. Tsirkin
On Mon, Jan 07, 2013 at 11:04:32PM +0800, Jason Wang wrote: On 01/07/2013 10:55 PM, Michael S. Tsirkin wrote: On Mon, Jan 07, 2013 at 12:38:17PM +0800, Jason Wang wrote: On 01/06/2013 09:22 PM, Michael S. Tsirkin wrote: On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: Polling

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-13 Thread Jason Wang
On 01/13/2013 07:10 PM, Michael S. Tsirkin wrote: On Mon, Jan 07, 2013 at 11:04:32PM +0800, Jason Wang wrote: On 01/07/2013 10:55 PM, Michael S. Tsirkin wrote: On Mon, Jan 07, 2013 at 12:38:17PM +0800, Jason Wang wrote: On 01/06/2013 09:22 PM, Michael S. Tsirkin wrote: On Sun, Jan 06, 2013 at

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-13 Thread Michael S. Tsirkin
On Mon, Jan 14, 2013 at 10:59:02AM +0800, Jason Wang wrote: On 01/13/2013 07:10 PM, Michael S. Tsirkin wrote: On Mon, Jan 07, 2013 at 11:04:32PM +0800, Jason Wang wrote: On 01/07/2013 10:55 PM, Michael S. Tsirkin wrote: On Mon, Jan 07, 2013 at 12:38:17PM +0800, Jason Wang wrote: On

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-13 Thread Jason Wang
On 01/14/2013 02:57 PM, Michael S. Tsirkin wrote: On Mon, Jan 14, 2013 at 10:59:02AM +0800, Jason Wang wrote: On 01/13/2013 07:10 PM, Michael S. Tsirkin wrote: On Mon, Jan 07, 2013 at 11:04:32PM +0800, Jason Wang wrote: On 01/07/2013 10:55 PM, Michael S. Tsirkin wrote: On Mon, Jan 07, 2013 at

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-07 Thread Jason Wang
On 01/07/2013 10:55 PM, Michael S. Tsirkin wrote: > On Mon, Jan 07, 2013 at 12:38:17PM +0800, Jason Wang wrote: >> On 01/06/2013 09:22 PM, Michael S. Tsirkin wrote: >>> On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: Polling errors were ignored by vhost/vhost_net, this may lead to

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-07 Thread Michael S. Tsirkin
On Mon, Jan 07, 2013 at 12:38:17PM +0800, Jason Wang wrote: > On 01/06/2013 09:22 PM, Michael S. Tsirkin wrote: > > On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: > >> Polling errors were ignored by vhost/vhost_net, this may lead to crash when > >> trying to remove vhost from

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-07 Thread Michael S. Tsirkin
On Mon, Jan 07, 2013 at 12:38:17PM +0800, Jason Wang wrote: On 01/06/2013 09:22 PM, Michael S. Tsirkin wrote: On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: Polling errors were ignored by vhost/vhost_net, this may lead to crash when trying to remove vhost from waitqueue when

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-07 Thread Jason Wang
On 01/07/2013 10:55 PM, Michael S. Tsirkin wrote: On Mon, Jan 07, 2013 at 12:38:17PM +0800, Jason Wang wrote: On 01/06/2013 09:22 PM, Michael S. Tsirkin wrote: On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: Polling errors were ignored by vhost/vhost_net, this may lead to crash

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-06 Thread Jason Wang
On 01/06/2013 09:22 PM, Michael S. Tsirkin wrote: > On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: >> Polling errors were ignored by vhost/vhost_net, this may lead to crash when >> trying to remove vhost from waitqueue when after the polling is failed. Solve >> this problem by: >> >>

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-06 Thread Michael S. Tsirkin
On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: > Polling errors were ignored by vhost/vhost_net, this may lead to crash when > trying to remove vhost from waitqueue when after the polling is failed. Solve > this problem by: > > - checking the poll->wqh before trying to remove from

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-06 Thread Michael S. Tsirkin
On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: Polling errors were ignored by vhost/vhost_net, this may lead to crash when trying to remove vhost from waitqueue when after the polling is failed. Solve this problem by: - checking the poll-wqh before trying to remove from

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-06 Thread Jason Wang
On 01/06/2013 09:22 PM, Michael S. Tsirkin wrote: On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: Polling errors were ignored by vhost/vhost_net, this may lead to crash when trying to remove vhost from waitqueue when after the polling is failed. Solve this problem by: - checking

[PATCH V3 2/2] vhost: handle polling errors

2013-01-05 Thread Jason Wang
Polling errors were ignored by vhost/vhost_net, this may lead to crash when trying to remove vhost from waitqueue when after the polling is failed. Solve this problem by: - checking the poll->wqh before trying to remove from waitqueue - report an error when poll() returns a POLLERR in

[PATCH V3 2/2] vhost: handle polling errors

2013-01-05 Thread Jason Wang
Polling errors were ignored by vhost/vhost_net, this may lead to crash when trying to remove vhost from waitqueue when after the polling is failed. Solve this problem by: - checking the poll-wqh before trying to remove from waitqueue - report an error when poll() returns a POLLERR in