Date: Thu, 28 May 2009 04:03:16 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r192951 - head/sys/xen/xenbus Message-ID: <200905280403.n4S43GEl021912@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Thu May 28 04:03:16 2009 New Revision: 192951 URL: http://svn.freebsd.org/changeset/base/192951 Log: Don't call the watch callback if its NULL. I'm not sure what series of events is leading up to this watch event being received with no callback info and it should be investigated. I'm triggering it somehow by registering an RTC device (which will show up in a subsequent commit.) Modified: head/sys/xen/xenbus/xenbus_xs.c Modified: head/sys/xen/xenbus/xenbus_xs.c ============================================================================== --- head/sys/xen/xenbus/xenbus_xs.c Thu May 28 04:00:03 2009 (r192950) +++ head/sys/xen/xenbus/xenbus_xs.c Thu May 28 04:03:16 2009 (r192951) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905280403.n4S43GEl021912>