From owner-freebsd-bluetooth@FreeBSD.ORG Thu Jul 21 16:16:11 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2DD6016A422 for ; Thu, 21 Jul 2005 16:16:11 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C82643D5C for ; Thu, 21 Jul 2005 16:15:42 +0000 (GMT) (envelope-from Maksim.Yevmenkin@savvis.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by mailgate1b.savvis.net (Postfix) with ESMTP id 51B7A3BE4A; Thu, 21 Jul 2005 11:15:41 -0500 (CDT) Received: from mailgate1b.savvis.net ([127.0.0.1]) by localhost (mailgate1b.savvis.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 26691-01-6; Thu, 21 Jul 2005 11:15:41 -0500 (CDT) Received: from out001.email.savvis.net (out001.apptix.savvis.net [216.91.32.44]) by mailgate1b.savvis.net (Postfix) with ESMTP id 2240D3BF12; Thu, 21 Jul 2005 11:15:41 -0500 (CDT) Received: from s228130hz1ew031.apptix-01.savvis.net ([10.146.4.28]) by out001.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Thu, 21 Jul 2005 11:15:32 -0500 Received: from [10.254.186.111] ([64.14.1.106]) by s228130hz1ew031.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Thu, 21 Jul 2005 11:15:26 -0500 Message-ID: <42DFCA22.5080007@savvis.net> Date: Thu, 21 Jul 2005 09:15:30 -0700 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson References: <42DFC4B1.9010301@centtech.com> In-Reply-To: <42DFC4B1.9010301@centtech.com> Content-Type: multipart/mixed; boundary="------------020404050306040302040702" X-OriginalArrivalTime: 21 Jul 2005 16:15:26.0350 (UTC) FILETIME=[67968AE0:01C58E0F] X-Virus-Scanned: amavisd-new at savvis.net Cc: freebsd-bluetooth@freebsd.org Subject: Re: bthidd causes panic on recent -current (7.0) X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2005 16:16:11 -0000 This is a multi-part message in MIME format. --------------020404050306040302040702 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Eric, > I recently cvsupped, and rebuilt world/kernel. After booting up, I > panic when bthidd runs. thanks for the report. the problem is not bthidd(8), its vkbd(4). i made a typo and did not properly initialize mutex (missed name). the patch is attached. thanks, max --------------020404050306040302040702 Content-Type: text/plain; name="vkbd.c.diff.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="vkbd.c.diff.txt" Index: vkbd.c =================================================================== RCS file: /usr/local/cvs/sys/dev/vkbd/vkbd.c,v retrieving revision 1.22 diff -u -r1.22 vkbd.c --- vkbd.c 23 Jun 2005 00:30:37 -0000 1.22 +++ vkbd.c 21 Jul 2005 16:11:15 -0000 @@ -65,7 +65,7 @@ *****************************************************************************/ #define VKBD_LOCK_DECL struct mtx ks_lock -#define VKBD_LOCK_INIT(s) mtx_init(&(s)->ks_lock, NULL, NULL, MTX_DEF) +#define VKBD_LOCK_INIT(s) mtx_init(&(s)->ks_lock, "vkbd_lock", NULL, MTX_DEF|MTX_RECURSE) #define VKBD_LOCK_DESTROY(s) mtx_destroy(&(s)->ks_lock) #define VKBD_LOCK(s) mtx_lock(&(s)->ks_lock) #define VKBD_UNLOCK(s) mtx_unlock(&(s)->ks_lock) --------------020404050306040302040702--