|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Disable watch callbacks while running the driver probe c
# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 179027128d998992b8e4c5b6e393cdd146f5dd18
# Parent 2796f432858e37ae901cebd750790ccfd9a83133
Disable watch callbacks while running the driver probe callback.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
diff -r 2796f432858e -r 179027128d99
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c Wed Oct 12
17:25:40 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c Wed Oct 12
17:43:26 2005
@@ -39,6 +39,8 @@
#include <linux/notifier.h>
#include "xenbus_comms.h"
+extern struct semaphore xenwatch_mutex;
+
#define streq(a, b) (strcmp((a), (b)) == 0)
static struct notifier_block *xenstore_chain;
@@ -205,6 +207,7 @@
struct xenbus_device *dev = to_xenbus_device(_dev);
struct xenbus_driver *drv = to_xenbus_driver(_dev->driver);
const struct xenbus_device_id *id;
+ int ret;
if (!drv->probe)
return -ENODEV;
@@ -213,7 +216,10 @@
if (!id)
return -ENODEV;
- return drv->probe(dev, id);
+ down(&xenwatch_mutex);
+ ret = drv->probe(dev, id);
+ up(&xenwatch_mutex);
+ return ret;
}
static int xenbus_dev_remove(struct device *_dev)
diff -r 2796f432858e -r 179027128d99
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c Wed Oct 12
17:25:40 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c Wed Oct 12
17:43:26 2005
@@ -92,7 +92,7 @@
* carrying out work.
*/
static pid_t xenwatch_pid;
-static DECLARE_MUTEX(xenwatch_mutex);
+/* static */ DECLARE_MUTEX(xenwatch_mutex);
static DECLARE_WAIT_QUEUE_HEAD(watch_events_waitq);
static int get_error(const char *errorstring)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] Disable watch callbacks while running the driver probe callback.,
Xen patchbot -unstable <=
|
|
|
|
|