From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 22:50:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C41C106564A; Tue, 14 Jul 2009 22:50:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A8168FC17; Tue, 14 Jul 2009 22:50:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6EMof4e073562; Tue, 14 Jul 2009 22:50:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6EMofBo073560; Tue, 14 Jul 2009 22:50:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200907142250.n6EMofBo073560@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 14 Jul 2009 22:50:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195700 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 22:50:42 -0000 Author: kib Date: Tue Jul 14 22:50:41 2009 New Revision: 195700 URL: http://svn.freebsd.org/changeset/base/195700 Log: When wakeup(9) is going to notify swapper, assert that wait channel is not equal to &proc0. It shall be not, since proc0 stack is not swappable, and kick_proc0() is wakeup(&proc0). Reviewed by: jhb Approved by: re (kensmith) Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Tue Jul 14 22:48:30 2009 (r195699) +++ head/sys/kern/kern_synch.c Tue Jul 14 22:50:41 2009 (r195700) @@ -347,8 +347,11 @@ wakeup(void *ident) sleepq_lock(ident); wakeup_swapper = sleepq_broadcast(ident, SLEEPQ_SLEEP, 0, 0); sleepq_release(ident); - if (wakeup_swapper) + if (wakeup_swapper) { + KASSERT(ident != &proc0, + ("wakeup and wakeup_swapper and proc0")); kick_proc0(); + } } /*