Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Sep 2010 10:26:49 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r212604 - head/sys/kern
Message-ID:  <201009141026.o8EAQnrN075614@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009141026.o8EAQnrN075614>