From owner-cvs-src@FreeBSD.ORG Wed Aug 17 17:56:36 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F3E116A41F; Wed, 17 Aug 2005 17:56:36 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7023443D53; Wed, 17 Aug 2005 17:56:35 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[10.50.40.201]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Wed, 17 Aug 2005 14:11:34 -0400 From: John Baldwin To: Hajimu UMEMOTO Date: Wed, 17 Aug 2005 13:56:57 -0400 User-Agent: KMail/1.8 References: <200508161949.j7GJnAaG015685@repoman.freebsd.org> <200508171318.27652.jhb@FreeBSD.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508171356.59672.jhb@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet6 in6_src.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2005 17:56:36 -0000 On Wednesday 17 August 2005 01:46 pm, Hajimu UMEMOTO wrote: > Hi, > > >>>>> On Wed, 17 Aug 2005 13:18:25 -0400 > >>>>> John Baldwin said: > > jhb> Thanks. I see that you still kept the mutex and and properly lock > both the sx jhb> and mutex when making updates, so it seems it is on > purpose. The one place jhb> that doesn't use the sx lock is > lookup_addrsel_policy() which is called from jhb> in6_selectsrc(). I guess > it is not ok to sleep in that function and that is jhb> why you don't use > the sx lock in that one place? > > Because, lookup_addrsel_policy() is protected by mutex lock. > add_addrsel_policyent() and delete_addrsel_policyent() do update the > tailq. Both of the two functions are also protected by mutex. So, I > tought that lookup_addrsel_policy() doesn't need sx lock. > I tried to stop using of mutex locks and used only sx locks, as learn > by mistake. It ended up with exclusive lock error between INP_LOCK. > So, I avoided to use sx lock in lookup_addrsel_policy(). > Am I something wrong? Ah, if you had a witness warning from INP_LOCK because INP_LOCK is held when in6_selectsrc() is called then you did the right thing and that answers my question. Thanks. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org