Date: Wed, 9 Sep 2020 16:13:34 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365504 - head/sys/kern Message-ID: <202009091613.089GDYkk086937@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Wed Sep 9 16:13:33 2020 New Revision: 365504 URL: https://svnweb.freebsd.org/changeset/base/365504 Log: In r354148 the goal was to check THREAD_CAN_SLEEP() only once for the purpose of epoch_trace() and for calling subsequent panic, but to keep code fully under INVARIANTS, so don't use bare function call to panic(). However, at the last stage of review a true value slipped in, while always false was assumed. I checked that in email archive with kib@. Noticed by: trasz Modified: head/sys/kern/subr_sleepqueue.c head/sys/kern/subr_trap.c Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Wed Sep 9 13:16:20 2020 (r365503) +++ head/sys/kern/subr_sleepqueue.c Wed Sep 9 16:13:33 2020 (r365504) @@ -325,7 +325,7 @@ sleepq_add(const void *wchan, struct lock_object *lock #ifdef EPOCH_TRACE epoch_trace_list(curthread); #endif - KASSERT(1, + KASSERT(0, ("%s: td %p to sleep on wchan %p with sleeping prohibited", __func__, td, wchan)); } Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Wed Sep 9 13:16:20 2020 (r365503) +++ head/sys/kern/subr_trap.c Wed Sep 9 16:13:33 2020 (r365504) @@ -187,7 +187,7 @@ userret(struct thread *td, struct trapframe *frame) #ifdef EPOCH_TRACE epoch_trace_list(curthread); #endif - KASSERT(1, ("userret: Returning with sleep disabled")); + KASSERT(0, ("userret: Returning with sleep disabled")); } KASSERT(td->td_pinned == 0 || (td->td_pflags & TDP_CALLCHAIN) != 0, ("userret: Returning with with pinned thread"));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009091613.089GDYkk086937>