diff options
| author | 2009-03-03 19:09:13 +0000 | |
|---|---|---|
| committer | 2009-03-03 19:09:13 +0000 | |
| commit | bfb015bcbe31c8231c69560b74d18d7a9e3a3f40 (patch) | |
| tree | 0662e17b9409c6358385cd03d6e4ee1bcb6a913c /sys/kern/kern_timeout.c | |
| parent | Make sure the scsi_xfer timeout is triggered while the command is still alive. (diff) | |
| download | wireguard-openbsd-bfb015bcbe31c8231c69560b74d18d7a9e3a3f40.tar.xz wireguard-openbsd-bfb015bcbe31c8231c69560b74d18d7a9e3a3f40.zip | |
put back r1.25 (poisoning chain pointers after removing items from the
wheel). This was safe, except for osiop bugs.
Diffstat (limited to 'sys/kern/kern_timeout.c')
| -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) |
