Date: Wed, 27 Feb 2013 20:54:46 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r247419 - projects/calloutng/sys/kern Message-ID: <201302272054.r1RKsk3X000870@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed Feb 27 20:54:45 2013 New Revision: 247419 URL: http://svnweb.freebsd.org/changeset/base/247419 Log: Close the hypothetical race when new callout inserted into the callwheel bucket, that now executes its last callout in direct mode, and so dropped the lock, caching NULL as the next callout pointer. Modified: projects/calloutng/sys/kern/kern_timeout.c Modified: projects/calloutng/sys/kern/kern_timeout.c ============================================================================== --- projects/calloutng/sys/kern/kern_timeout.c Wed Feb 27 20:20:21 2013 (r247418) +++ projects/calloutng/sys/kern/kern_timeout.c Wed Feb 27 20:54:45 2013 (r247419) @@ -489,7 +489,6 @@ next: * Stop if we looked far enough into the future. */ } while (firstb <= lastb); - cc->cc_exec_next_dir = NULL; cc->cc_firstevent = last; #ifndef NO_EVENTTIMERS cpu_new_callout(curcpu, last, first); @@ -555,6 +554,8 @@ callout_cc_add(struct callout *c, struct c, (int)(c->c_precision >> 32), (u_int)(c->c_precision & 0xffffffff)); TAILQ_INSERT_TAIL(&cc->cc_callwheel[bucket], c, c_links.tqe); + if (cc->cc_exec_next_dir == NULL) + cc->cc_exec_next_dir = c; #ifndef NO_EVENTTIMERS /* * Inform the eventtimers(4) subsystem there's a new callout
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302272054.r1RKsk3X000870>