diff options
author | 2006-04-21 01:35:27 +0000 | |
---|---|---|
committer | 2006-04-21 01:35:27 +0000 | |
commit | b5264751c62970407673ad1fecf721e7c269a542 (patch) | |
tree | 271d3e39fdd7f58c9c44cc7aaeae7667687f215d /sys/kern/kern_timeout.c | |
parent | sync (diff) | |
download | wireguard-openbsd-b5264751c62970407673ad1fecf721e7c269a542.tar.xz wireguard-openbsd-b5264751c62970407673ad1fecf721e7c269a542.zip |
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/kern_timeout.c')
-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; |