diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-03-03 19:09:14 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-03-03 19:09:14 +0000 |
commit | 377d2887ff99ee8607be820565642c8b512fde48 (patch) | |
tree | f755d6af3b2f9b238880cdce9df10bf24cdd3196 | |
parent | 0a9ca98521d5d9a8762a637b8e8f4b04a433bec8 (diff) |
put back r1.25 (poisoning chain pointers after removing items from the
wheel). This was safe, except for osiop bugs.
-rw-r--r-- | sys/kern/kern_timeout.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index 492a892fe4b..4e385102d97 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_timeout.c,v 1.29 2008/10/22 08:38:06 blambert Exp $ */ +/* $OpenBSD: kern_timeout.c,v 1.30 2009/03/03 19:09:13 miod Exp $ */ /* * Copyright (c) 2001 Thomas Nordin <nordin@openbsd.org> * Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org> @@ -31,6 +31,7 @@ #include <sys/timeout.h> #include <sys/mutex.h> #include <sys/kernel.h> +#include <sys/queue.h> /* _Q_INVALIDATE */ #ifdef DDB #include <machine/db_machdep.h> @@ -108,6 +109,8 @@ struct mutex timeout_mutex = MUTEX_INITIALIZER(IPL_HIGH); #define CIRCQ_REMOVE(elem) do { \ (elem)->next->prev = (elem)->prev; \ (elem)->prev->next = (elem)->next; \ + _Q_INVALIDATE((elem)->prev); \ + _Q_INVALIDATE((elem)->next); \ } while (0) #define CIRCQ_FIRST(elem) ((elem)->next) |