From owner-freebsd-current@FreeBSD.ORG Thu Aug 19 22:53:35 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 33B9616A4CE for ; Thu, 19 Aug 2004 22:53:35 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 88BF243D4C for ; Thu, 19 Aug 2004 22:53:34 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.2.73] (cpe.125.wat.v126.packetworks.net [64.235.97.125] (may be forged)) (authenticated bits=0) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id i7JMs545071866; Thu, 19 Aug 2004 16:54:06 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <41252ECC.5000203@samsco.org> Date: Thu, 19 Aug 2004 16:50:52 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.1) Gecko/20040801 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Roman Kurakin References: <41252924.4020305@cronyx.ru> In-Reply-To: <41252924.4020305@cronyx.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=3.8 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on pooker.samsco.org cc: freebsd-current@freebsd.org Subject: Re: Tracking down LORs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Thu, 19 Aug 2004 22:53:35 -0000 Roman Kurakin wrote: > Hi, > > Currently I am trying to track down a couple of LORS > in my code. But it seems that I do not undestand smth or all > things id realy so bad. > > So I want to ask some questions to find out if my thoughts > correct or wrong. > > 1. If I am right LOR means that we have at least two mutexs. > Lets call them a and b. If we set a, then b in first case > and b then a in second we could get dead loop, and thus LOR. Correct. > > 2. If I have some driver that have mutex a, and we have some > sytem code that could call this driver with Giant (b), we would > get LOR if driver lock a and some other part of system will > try to lock Giant? The general rule is that NO other locks should be held when Giant is grabbed. Scott