mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-30 15:38:06 +01:00
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.)
This commit is contained in:
parent
cc79e34966
commit
1fc05890ae
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=192951
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user