diff options
-rw-r--r-- | sys/xen/xenbus/xenbus_xs.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/xen/xenbus/xenbus_xs.c b/sys/xen/xenbus/xenbus_xs.c index 8069556..9312255 100644 --- a/sys/xen/xenbus/xenbus_xs.c +++ b/sys/xen/xenbus/xenbus_xs.c @@ -769,10 +769,17 @@ xenwatch_thread(void *unused) mtx_unlock(&watch_events_lock); if (msg != NULL) { - msg->u.watch.handle->callback( - msg->u.watch.handle, - (const char **)msg->u.watch.vec, - msg->u.watch.vec_size); + /* + * XXX There are messages coming in with a NULL callback. + * XXX This deserves further investigation; the workaround + * XXX here simply prevents the kernel from panic'ing + * XXX on startup. + */ + if (msg->u.watch.handle->callback != NULL) + msg->u.watch.handle->callback( + msg->u.watch.handle, + (const char **)msg->u.watch.vec, + msg->u.watch.vec_size); free(msg->u.watch.vec, M_DEVBUF); free(msg, M_DEVBUF); } |