]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commit
Avoid removing filters on upgrade installations
authorPaul Durrant <paul.durrant@citrix.com>
Mon, 20 May 2019 14:43:34 +0000 (15:43 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Mon, 20 May 2019 15:16:30 +0000 (16:16 +0100)
commit9d28a9e9b798f9e20a279905178133333212858e
treee6a0ba07339401019122781fd33114b1c61eb925
parent7639ae38910dcfa05a9568425df683f8be63c1ae
Avoid removing filters on upgrade installations

When upgrading XENBUS in a situation where XENVBD has made it uninstallable
(without reboot), DriverRemoveFunctionDeviceObject() in the old instance of
XENBUS will cause XENFILT to be removed as PCI and IDE upper filter. Then,
when the new instance of XENBUS starts, it will find an incompatible
version of XEN prior to adding the registery filter entries back in. Thus,
after the requested reboot XENFILT will non-functional and another reboot
will be required to re-instate it.

This patch removes the call to FiltersUninstall() from
DriverRemoveFunctionDeviceObject() and, instead, calls it from
DriverEntry() AFTER the compatibility check. This means that XENFILT will
remain installed across an upgrade and will only be removed if XENBUS
started but has no bound devices (i.e. it has actually been un-installed).

NOTE: This also fixes an unitialized pointer in FiltersUninstallClass().

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xenbus/driver.c
src/xenbus/filters.c