svn commit: r212604 - head/sys/kern
Alexander Motin
mav at FreeBSD.org
Tue Sep 14 10:26:49 UTC 2010
Author: mav
Date: Tue Sep 14 10:26:49 2010
New Revision: 212604
URL: http://svn.freebsd.org/changeset/base/212604
Log:
Fix panic on NULL dereference possible after r212541.
Modified:
head/sys/kern/kern_timeout.c
Modified: head/sys/kern/kern_timeout.c
==============================================================================
--- head/sys/kern/kern_timeout.c Tue Sep 14 08:48:06 2010 (r212603)
+++ head/sys/kern/kern_timeout.c Tue Sep 14 10:26:49 2010 (r212604)
@@ -672,7 +672,8 @@ retry:
c->c_time = ticks + to_ticks;
TAILQ_INSERT_TAIL(&cc->cc_callwheel[c->c_time & callwheelmask],
c, c_links.tqe);
- if ((c->c_time - cc->cc_firsttick) < 0) {
+ if ((c->c_time - cc->cc_firsttick) < 0 &&
+ callout_new_inserted != NULL) {
cc->cc_firsttick = c->c_time;
(*callout_new_inserted)(cpu,
to_ticks + (ticks - cc->cc_ticks));
More information about the svn-src-head
mailing list