From: art Date: Mon, 14 Jul 2008 15:17:08 +0000 (+0000) Subject: Don't lock timeouts in db_show_callout. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=25431f283335bf333f0b42d744050b318255aea7;p=openbsd 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. --- 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 * Copyright (c) 2000-2001 Artur Grabowski @@ -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