diff options
author | David Vrabel <david.vrabel@citrix.com> | 2013-02-14 03:18:57 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-03-06 03:24:20 +0000 |
commit | aa067cfc66595a3a842ef56a9211a674ee136422 (patch) | |
tree | 92d3bfd4b2a6311911f75d160c24004ee3a8a6a9 /usr | |
parent | 1642974c7f646c8a32bc7a15d37f4e14ceead334 (diff) | |
download | lwn-aa067cfc66595a3a842ef56a9211a674ee136422.tar.gz lwn-aa067cfc66595a3a842ef56a9211a674ee136422.zip |
xen-netback: correctly return errors from netbk_count_requests()
[ Upstream commit 35876b5ffc154c357476b2c3bdab10feaf4bd8f0 ]
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 <wei.liu2@citrix.com>
Signed-off-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reported-by: Christopher S. Aker <caker@theshore.net>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions