From owner-freebsd-hackers Sun Jun 23 13:14:26 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 4848E37B405 for ; Sun, 23 Jun 2002 13:14:17 -0700 (PDT) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.3/8.12.3) with ESMTP id g5NKECCV058637; Sun, 23 Jun 2002 13:14:12 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.3/8.12.3/Submit) id g5NKE5x3058562; Sun, 23 Jun 2002 13:14:05 -0700 (PDT) (envelope-from dillon) Date: Sun, 23 Jun 2002 13:14:05 -0700 (PDT) From: Matthew Dillon Message-Id: <200206232014.g5NKE5x3058562@apollo.backplane.com> To: freebsd-hackers@freebsd.org Cc: Julian Elischer , Alan Cox , Tor.Egge@cvsup.no.freebsd.org Subject: Bug in wakeup() (stable and current) ? Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This doesn't look right at all. It looks like wakeup is not restarting properly: s = splhigh(); qp = &slpque[LOOKUP(ident)]; restart: TAILQ_FOREACH(p, qp, p_procq) { if (p->p_wchan == ident) { TAILQ_REMOVE(qp, p, p_procq); p->p_wchan = 0; if (p->p_stat == SSLEEP) { ... goto restart; } /* XXXXXX goto restart should occur HERE XXXXXX */ } } The goto restart condition should occur one level up, as I show in the comment. Could someone take a look at this and tell me if I am blowing smoke? -Matt Matthew Dillon Index: kern_synch.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_synch.c,v retrieving revision 1.87.2.4 diff -u -r1.87.2.4 kern_synch.c --- kern_synch.c 14 Nov 2001 17:22:49 -0000 1.87.2.4 +++ kern_synch.c 23 Jun 2002 20:10:37 -0000 @@ -745,8 +745,8 @@ wakeup((caddr_t)&proc0); } /* END INLINE EXPANSION */ - goto restart; } + goto restart; } } splx(s); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message