From owner-freebsd-current@FreeBSD.ORG Wed Jul 15 07:36:07 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 588F01065670 for ; Wed, 15 Jul 2009 07:36:07 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.tele2.se [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id E45DE8FC14 for ; Wed, 15 Jul 2009 07:36:06 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=gg2W7PyvkLb8p4ie143lBA==:17 a=BNHX5fK6d1LouUOMUiIA:9 a=c2ch--bl7NxkJAzLF1UA:7 a=YXTU26d45yOL8jXd_tNlrdKosggA:4 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 537138429; Wed, 15 Jul 2009 09:36:03 +0200 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Wed, 15 Jul 2009 09:35:44 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <19037.18987.220923.425353@jerusalem.litteratus.org> In-Reply-To: <19037.18987.220923.425353@jerusalem.litteratus.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907150935.45390.hselasky@c2i.net> Cc: Robert Huff Subject: Re: repeatable panic in ukbd.c 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: Wed, 15 Jul 2009 07:36:07 -0000 On Wednesday 15 July 2009 05:16:59 Robert Huff wrote: > After updating to: > > FreeBSD 8.0-BETA1 #0: Sun Jul 12 18:26:14 EDT 2009 i386 > > I suddenly have a recurring but irregular panic: > > panic: mutex Giant not owned at /usr/src/sys/dev/usb/input/ukbd.c:986 > > and a complete crash dump. > This doesn't seem to be a known problem. To whom should I > address this? > Hi, We need the backtrace. When I redid the ukbd driver I added the asserts to catch this kind of issues. The solution in many cases is simply to return a failure when ukbd is not called having Giant locked. Ukbd has to go away from the Giant lock, but I'm not confident about the locking strategy in the keyboard system nowadays, so I've deferred the task. static int ukbd_enable(keyboard_t *kbd) { mtx_assert(&Giant, MA_OWNED); KBD_ACTIVATE(kbd); return (0); } --HPS