Date: Fri, 10 Jun 2011 18:58:48 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r222941 - stable/7/sys/kern Message-ID: <201106101858.p5AIwmpw038957@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Jun 10 18:58:48 2011 New Revision: 222941 URL: http://svn.freebsd.org/changeset/base/222941 Log: MFC 222252: Simplify a stale assertion. We have not called mi_switch() from a nested critical section during a preemption for several years. Modified: stable/7/sys/kern/kern_synch.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_synch.c ============================================================================== --- stable/7/sys/kern/kern_synch.c Fri Jun 10 18:58:32 2011 (r222940) +++ stable/7/sys/kern/kern_synch.c Fri Jun 10 18:58:48 2011 (r222941) @@ -383,9 +383,7 @@ mi_switch(int flags, struct thread *newt if (!TD_ON_LOCK(td) && !TD_IS_RUNNING(td)) mtx_assert(&Giant, MA_NOTOWNED); #endif - KASSERT(td->td_critnest == 1 || (td->td_critnest == 2 && - (td->td_owepreempt) && (flags & SW_INVOL) != 0 && - newtd == NULL) || panicstr, + KASSERT(td->td_critnest == 1 || panicstr, ("mi_switch: switch in a critical section")); KASSERT((flags & (SW_INVOL | SW_VOL)) != 0, ("mi_switch: switch must be voluntary or involuntary"));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106101858.p5AIwmpw038957>