Re: [PATCH 1/2] vhost_net: correct error hanlding in vhost_net_set_backend()

2012-12-27 Thread Michael S. Tsirkin
On Thu, Dec 27, 2012 at 02:39:20PM +0800, Jason Wang wrote: Currently, polling error were ignored in vhost. This may lead some issues (e.g kenrel crash when passing a tap fd to vhost before calling TUNSETIFF). Fix this by: - extend the idea of vhost_net_poll_state to all vhost_polls -

Re: [PATCH 1/2] vhost_net: correct error hanlding in vhost_net_set_backend()

2012-12-27 Thread Michael S. Tsirkin
On Thu, Dec 27, 2012 at 02:39:19PM +0800, Jason Wang wrote: Fix the leaking of oldubufs and fd refcnt when fail to initialized used ring. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/net.c | 14 +++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff

Re: [PATCH 1/2] vhost_net: correct error hanlding in vhost_net_set_backend()

2012-12-27 Thread Jason Wang
On 12/27/2012 09:03 PM, Michael S. Tsirkin wrote: On Thu, Dec 27, 2012 at 02:39:20PM +0800, Jason Wang wrote: Currently, polling error were ignored in vhost. This may lead some issues (e.g kenrel crash when passing a tap fd to vhost before calling TUNSETIFF). Fix this by: - extend the

Re: [PATCH 1/2] vhost_net: correct error hanlding in vhost_net_set_backend()

2012-12-27 Thread Jason Wang
On 12/27/2012 09:14 PM, Michael S. Tsirkin wrote: On Thu, Dec 27, 2012 at 02:39:19PM +0800, Jason Wang wrote: Fix the leaking of oldubufs and fd refcnt when fail to initialized used ring. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/net.c | 14 +++--- 1 files

[PATCH 1/2] vhost_net: correct error hanlding in vhost_net_set_backend()

2012-12-26 Thread Jason Wang
Fix the leaking of oldubufs and fd refcnt when fail to initialized used ring. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/net.c | 14 +++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index