diff options
author | Roger Pau Monne <roger.pau@citrix.com> | 2013-05-03 13:23:02 +0200 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-05-08 12:06:55 +0100 |
commit | 05bfd984dfe7014f1f5ea1133608b9bab589c120 (patch) | |
tree | 36587b94217ce73a66044e6800af0ad532765fd7 /tools/libxl/libxl_device.c | |
parent | 846bd69104e5d62f29b7282419827e52e99f3efd (diff) | |
download | xen-05bfd984dfe7014f1f5ea1133608b9bab589c120.tar.gz xen-05bfd984dfe7014f1f5ea1133608b9bab589c120.tar.bz2 xen-05bfd984dfe7014f1f5ea1133608b9bab589c120.zip |
libxl: don't execute hotplug scripts if device is on a driver domain
Prevent hotplug script execution from libxl if device is on a
different domain.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_device.c')
-rw-r--r-- | tools/libxl/libxl_device.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c index b1fc4efe03..bc86648af8 100644 --- a/tools/libxl/libxl_device.c +++ b/tools/libxl/libxl_device.c @@ -903,6 +903,13 @@ static void device_hotplug(libxl__egc *egc, libxl__ao_device *aodev) int hotplug; pid_t pid; + /* + * If device is attached from a driver domain don't try to execute + * hotplug scripts + */ + if (aodev->dev->backend_domid != LIBXL_TOOLSTACK_DOMID) + goto out; + /* Check if we have to execute hotplug scripts for this device * and return the necessary args/env vars for execution */ hotplug = libxl__get_hotplug_script_info(gc, aodev->dev, &args, &env, |