]> git.baikalelectronics.ru Git - kernel.git/commit
xenbus: limit when state is forced to closed
authorPaul Durrant <pdurrant@amazon.com>
Wed, 11 Dec 2019 15:29:54 +0000 (15:29 +0000)
committerJuergen Gross <jgross@suse.com>
Fri, 20 Dec 2019 12:44:38 +0000 (13:44 +0100)
commit2b58784ce3a6121ba336ff2e556b5611b4aa8345
tree0c02679348828cabd2b20ebfd564490ca20b8aa7
parentd453bc3f0ea7bece51e0f92ab590decfbaa1ae4e
xenbus: limit when state is forced to closed

If a driver probe() fails then leave the xenstore state alone. There is no
reason to modify it as the failure may be due to transient resource
allocation issues and hence a subsequent probe() may succeed.

If the driver supports re-binding then only force state to closed during
remove() only in the case when the toolstack may need to clean up. This can
be detected by checking whether the state in xenstore has been set to
closing prior to device removal.

NOTE: Re-bind support is indicated by new boolean in struct xenbus_driver,
      which defaults to false. Subsequent patches will add support to
      some backend drivers.

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/xenbus/xenbus_probe.c
include/xen/xenbus.h