From owner-freebsd-current@FreeBSD.ORG Fri Jul 13 08:58:47 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B257816A402; Fri, 13 Jul 2007 08:58:47 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.freebsd.org (Postfix) with ESMTP id EB49D13C481; Fri, 13 Jul 2007 08:58:46 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.lan) by mailfe01.swip.net (CommuniGate Pro SMTP 5.1.10) with ESMTPA id 525561390; Fri, 13 Jul 2007 10:58:45 +0200 From: Hans Petter Selasky To: d@delphij.net Date: Fri, 13 Jul 2007 10:58:48 +0200 User-Agent: KMail/1.9.5 References: <46970DF7.3000803@elischer.org> <200707131021.59966.hselasky@c2i.net> <46973A08.3030607@delphij.net> In-Reply-To: <46973A08.3030607@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200707131058.48999.hselasky@c2i.net> Cc: attilio@freebsd.org, freebsd-current@freebsd.org, Julian Elischer , FreeBSD Current Subject: Re: crash in tty code in 6.1.. fixed since? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2007 08:58:47 -0000 On Friday 13 July 2007 10:38, LI Xin wrote: > Hans Petter Selasky wrote: > [...] > > > Maybe related: > > > > Regarding the keyboard system which is also Giant locked, we should add > > assert Giant statements, because I see several callers doing calls into > > the keyboard system without holding Giant! > > I think that is a good idea. By adding these assertions our user > community would be able to catch more under-exercised codepath under > their workload. > > Do you already have some patch to add these assertions? No. But I have added several assertions to my "ukbd.c", mainly in the callbacks. From time to time they trigger, and then I just return, because there is no other choice. That means, if you try to lock Giant, you will most likely get a locking order reversal. The worst example is the mechanism when you print something and scroll lock led is enabled. Then printf will call the ukbd driver to clear the scroll lock led! Yikes. Ouuch. "ukbd.c" must out of Giant! http://www.turbocat.net/~hselasky/isdn4bsd/sources/src/sys/dev/usb/ukbd.c --HPS