From: David Vrabel Date: Thu, 14 Feb 2013 03:18:57 +0000 (+0000) Subject: xen-netback: correctly return errors from netbk_count_requests() X-Git-Tag: v3.9-rc1~139^2~29^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35876b5ffc154c357476b2c3bdab10feaf4bd8f0;p=pandora-kernel.git xen-netback: correctly return errors from netbk_count_requests() netbk_count_requests() could detect an error, call netbk_fatal_tx_error() but return 0. The vif may then be used afterwards (e.g., in a call to netbk_tx_error(). Since netbk_fatal_tx_error() could set vif->refcnt to 1, the vif may be freed immediately after the call to netbk_fatal_tx_error() (e.g., if the vif is also removed). Netback thread Xenwatch thread ------------------------------------------- netbk_fatal_tx_err() netback_remove() xenvif_disconnect() ... free_netdev() netbk_tx_err() Oops! Signed-off-by: Wei Liu Signed-off-by: Jan Beulich Signed-off-by: David Vrabel Reported-by: Christopher S. Aker Acked-by: Ian Campbell Signed-off-by: David S. Miller --- Reading git-diff-tree failed