diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2006-04-21 01:35:28 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2006-04-21 01:35:28 +0000 |
commit | 58d7e817ef428a8856f1c3cc7f83754e81acab83 (patch) | |
tree | 3a50dcb6fcb46328dc4902d7c0186f6ec625bfe7 /sys/kern | |
parent | a8a64274d297f807b30b953044aba7a5470a9056 (diff) |
back out my last commit.
art pointed out that timeout_set is the initializer of timeout structs.
this means that the ONQUEUE flag could be set when timeout_set is given
freshly allocated memory. my commit suddenly introduced the requirement
that you bzero a timeout before initialising it. without the bzero we
could generate false positives about the timeout being already queued.
art did produce a diff that would walk the queues when the flag was set
to see if it really was in the lists, but deraadt considers this too much
of a hit.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_timeout.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index 476eb6371ee..f9d7a7be16b 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_timeout.c,v 1.23 2006/04/18 21:48:34 dlg Exp $ */ +/* $OpenBSD: kern_timeout.c,v 1.24 2006/04/21 01:35:27 dlg Exp $ */ /* * Copyright (c) 2001 Thomas Nordin <nordin@openbsd.org> * Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org> @@ -141,11 +141,6 @@ timeout_startup(void) void timeout_set(struct timeout *new, void (*fn)(void *), void *arg) { -#ifdef DIAGNOSTIC - if (new->to_flags & TIMEOUT_ONQUEUE) - panic("timeout_set: already queued"); -#endif - new->to_func = fn; new->to_arg = arg; new->to_flags = TIMEOUT_INITIALIZED; |