summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorart <art@openbsd.org>2008-07-14 15:17:08 +0000
committerart <art@openbsd.org>2008-07-14 15:17:08 +0000
commit25431f283335bf333f0b42d744050b318255aea7 (patch)
tree06b1b1e94ddb78a40cb8a4db2df05e9ffb693607
parentUse uvm_km_valloc_prefer_wait() instead of uvm_km_valloc_wait() in vmapbuf(). (diff)
downloadwireguard-openbsd-25431f283335bf333f0b42d744050b318255aea7.tar.xz
wireguard-openbsd-25431f283335bf333f0b42d744050b318255aea7.zip
Don't lock timeouts in db_show_callout.
All cpus are stopped and this cpu blocks all interrupts. It doesn't make sense to grab locks that ddb can then jump past with longjmp. Noticed by Pierre Riteau. I just forgot about the bug until reminded today.
-rw-r--r--sys/kern/kern_timeout.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index 5916de193a8..9a8afbf2c55 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_timeout.c,v 1.27 2008/07/11 14:18:39 blambert Exp $ */
+/* $OpenBSD: kern_timeout.c,v 1.28 2008/07/14 15:17:08 art Exp $ */
/*
* Copyright (c) 2001 Thomas Nordin <nordin@openbsd.org>
* Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org>
@@ -354,10 +354,8 @@ db_show_callout(db_expr_t addr, int haddr, db_expr_t count, char *modif)
db_printf("ticks now: %d\n", ticks);
db_printf(" ticks wheel arg func\n");
- mtx_enter(&timeout_mutex);
db_show_callout_bucket(&timeout_todo);
for (b = 0; b < BUCKETS; b++)
db_show_callout_bucket(&timeout_wheel[b]);
- mtx_leave(&timeout_mutex);
}
#endif