Skip to content

Commit

Permalink
tapback: Fix InitWait for libxl
Browse files Browse the repository at this point in the history
libxl waits for InitWait before running its scripts which will
eventually set hotplug-status = "true".  Since tapback is waiting for
hotplug-status = "true" before switching to InitWait, we have a
deadlock.

Switch unilaterally.  libxl writes its entries in a transaction, so we
should be okay.  hotplug_status_connected still waits for
hotplug-status, so we should be okay from advancing in other code.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
  • Loading branch information
jandryuk committed Apr 25, 2023
1 parent ce08eff commit 96ffa61
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tapback/frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,7 @@ frontend_changed(vbd_t * const device, const XenbusState state)

switch (state) {
case XenbusStateInitialising:
if (device->hotplug_status_connected)
err = xenbus_switch_state(device, XenbusStateInitWait);
err = xenbus_switch_state(device, XenbusStateInitWait);
break;
case XenbusStateInitialised:
case XenbusStateConnected:
Expand Down

0 comments on commit 96ffa61

Please sign in to comment.