aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/netfront.c
diff options
context:
space:
mode:
authorBen Cressey <bcressey@amazon.com>2013-09-06 12:52:07 -0700
committerIan Campbell <ian.campbell@citrix.com>2013-09-10 10:55:17 +0100
commita320c05b828275c19ae5b816715be8453ea2f190 (patch)
tree978a00f39b470faa72b3f9337e44684917579fdf /extras/mini-os/netfront.c
parent319e8ee03c88002cf7a3f4da49b3ecbc29eb698e (diff)
downloadxen-a320c05b828275c19ae5b816715be8453ea2f190.tar.gz
xen-a320c05b828275c19ae5b816715be8453ea2f190.tar.bz2
xen-a320c05b828275c19ae5b816715be8453ea2f190.zip
minios: fix xenbus_rm() calls in frontend drivers
The commit "minios: refactor xenbus state machine" caused "/state" to be appended to the local value of nodename. Previously the nodename variable pointed to dev->nodename. The xenbus_rm() calls were not updated to reflect this change, and refer to paths that do not exist. For example, shutdown_blkfront() for vbd 2049 would issue these calls: xenbus_rm(XBT_NIL, "device/vbd/2049/state/ring-ref"); xenbus_rm(XBT_NIL, "device/vbd/2049/state/event-channel"); This patch restores the previous behavior, issuing these calls instead: xenbus_rm(XBT_NIL, "device/vbd/2049/ring-ref"); xenbus_rm(XBT_NIL, "device/vbd/2049/event-channel"); This causes frontend drivers to not be properly reset when PV-GRUB exists. Some PV Linux drivers fail to re-initialize frontend devices if PV-GRUB leaves them in this state. Signed-off-by: Ben Cressey <bcressey@amazon.com> Reviewed-by: Matt Wilson <msw@amazon.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> [msw: adjusted commit message to include consequences, split out changes into separate patches] Signed-off-by: Matt Wilson <msw@amazon.com>
Diffstat (limited to 'extras/mini-os/netfront.c')
-rw-r--r--extras/mini-os/netfront.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/extras/mini-os/netfront.c b/extras/mini-os/netfront.c
index dc29f14075..4e087a56ed 100644
--- a/extras/mini-os/netfront.c
+++ b/extras/mini-os/netfront.c
@@ -549,14 +549,14 @@ close:
if (err) free(err);
xenbus_unwatch_path_token(XBT_NIL, path, path);
- snprintf(path, sizeof(path), "%s/tx-ring-ref", nodename);
- xenbus_rm(XBT_NIL, path);
- snprintf(path, sizeof(path), "%s/rx-ring-ref", nodename);
- xenbus_rm(XBT_NIL, path);
- snprintf(path, sizeof(path), "%s/event-channel", nodename);
- xenbus_rm(XBT_NIL, path);
- snprintf(path, sizeof(path), "%s/request-rx-copy", nodename);
- xenbus_rm(XBT_NIL, path);
+ snprintf(nodename, sizeof(nodename), "%s/tx-ring-ref", dev->nodename);
+ xenbus_rm(XBT_NIL, nodename);
+ snprintf(nodename, sizeof(nodename), "%s/rx-ring-ref", dev->nodename);
+ xenbus_rm(XBT_NIL, nodename);
+ snprintf(nodename, sizeof(nodename), "%s/event-channel", dev->nodename);
+ xenbus_rm(XBT_NIL, nodename);
+ snprintf(nodename, sizeof(nodename), "%s/request-rx-copy", dev->nodename);
+ xenbus_rm(XBT_NIL, nodename);
if (!err)
free_netfront(dev);