From: Jason Wang Date: Mon, 28 Jan 2013 01:05:17 +0000 (+0000) Subject: vhost_net: correct error handling in vhost_net_set_backend() X-Git-Tag: v3.8-rc7~2^2~37 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=692a998b908ae4c612d95d1f5f5adae03eca2b79;p=pandora-kernel.git vhost_net: correct error handling in vhost_net_set_backend() Currently, when vhost_init_used() fails the sock refcnt and ubufs were leaked. Correct this by calling vhost_init_used() before assign ubufs and restore the oldsock when it fails. Signed-off-by: Jason Wang Signed-off-by: David S. Miller --- Reading git-diff-tree failed