From owner-cvs-src@FreeBSD.ORG Wed Aug 17 17:47:07 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 EEEB916A41F; Wed, 17 Aug 2005 17:47:07 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from ameno.mahoroba.org (gw4.mahoroba.org [218.45.22.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 507CE43D49; Wed, 17 Aug 2005 17:47:07 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from kasuga.mahoroba.org (IDENT:FyeWBSNvuoNuyT4Ya2fC4Xg6rTxzBapDn/nWpKwXDgsa/jOtEjrQzaUin5hXZsO4@[IPv6:3ffe:501:185b:801a:20b:97ff:fe2e:b521]) (user=ume mech=CRAM-MD5 bits=0) by ameno.mahoroba.org (8.13.3/8.13.3) with ESMTP/inet6 id j7HHks2S036961 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Aug 2005 02:46:57 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Thu, 18 Aug 2005 02:46:40 +0900 Message-ID: From: Hajimu UMEMOTO To: John Baldwin In-Reply-To: <200508171318.27652.jhb@FreeBSD.org> References: <200508161949.j7GJnAaG015685@repoman.freebsd.org> <200508161559.24097.jhb@FreeBSD.org> <200508171318.27652.jhb@FreeBSD.org> User-Agent: xcite1.38> Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/22.0.50 (i386-unknown-freebsd6.0) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 6.0-BETA2 X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0 (ameno.mahoroba.org [IPv6:3ffe:501:185b:8010::1]); Thu, 18 Aug 2005 02:46:59 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on ameno.mahoroba.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:47:08 -0000 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? Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/