From d67179ec7d40605fca23fb6a06b8a26cc6093661 Mon Sep 17 00:00:00 2001 From: hselasky Date: Fri, 20 Oct 2017 10:07:17 +0000 Subject: [PATCH] MFC r324445: When showing the sleepqueues from the in-kernel debugger, properly dump all the sleepqueues and not just the first one History: It appears that in the commit which introduced the code, r165272, the array indexes of "sq_blocked[0]" and "td_name[i]" were interchanged. In r180927 "td_name[i]" was corrected to "td_name[0]", but "sq_blocked[0]" was left unchanged. PR: 222624 Discussed with: kmacy @ Sponsored by: Mellanox Technologies git-svn-id: svn://svn.freebsd.org/base/stable/9@324801 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/kern/subr_sleepqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c index 1d7f33a1f..8f5574abe 100644 --- a/sys/kern/subr_sleepqueue.c +++ b/sys/kern/subr_sleepqueue.c @@ -1219,7 +1219,7 @@ found: if (TAILQ_EMPTY(&sq->sq_blocked[i])) db_printf("\tempty\n"); else - TAILQ_FOREACH(td, &sq->sq_blocked[0], + TAILQ_FOREACH(td, &sq->sq_blocked[i], td_slpq) { db_printf("\t%p (tid %d, pid %d, \"%s\")\n", td, td->td_tid, td->td_proc->p_pid, -- 2.42.0