From owner-svn-src-all@FreeBSD.ORG Tue Mar 20 19:04:00 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E7B5D1065679; Tue, 20 Mar 2012 19:04:00 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B89998FC15; Tue, 20 Mar 2012 19:04:00 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 6B1D046B43; Tue, 20 Mar 2012 15:04:00 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id DA4A0B960; Tue, 20 Mar 2012 15:03:59 -0400 (EDT) From: John Baldwin To: Sergey Kandaurov Date: Tue, 20 Mar 2012 14:53:52 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <201203192015.q2JKFItl084480@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203201453.52982.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 20 Mar 2012 15:03:59 -0400 (EDT) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r233199 - in stable/8/sys: i386/conf netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2012 19:04:01 -0000 On Tuesday, March 20, 2012 5:02:48 am Sergey Kandaurov wrote: > On 20 March 2012 00:15, John Baldwin wrote: > > Author: jhb > > Date: Mon Mar 19 20:15:18 2012 > > New Revision: 233199 > > URL: http://svn.freebsd.org/changeset/base/233199 > > > > Log: > > MFC 225096: > > Fix if_addr_mtx recursion in mld6. > > Ehh.. Thank you for doing this. > As I mentioned earlier I could not reproduce this problem myself > in RELENG_8, that's why it was not MFCed so far... To be honest, my main movitation was to remove a merge conflict in my subsequent MFC of the IF_ADDR locking changes. I could have patched the locking in the old mld6.c, but when I reviewed your diff, I figured it would be better to merge it first instead. > > > > mld_set_version() is called only from mld_v1_input_query() and > > mld_v2_input_query() both holding the if_addr_mtx lock, and then calling > > into mld_v2_cancel_link_timers() acquires it the second time, which results > > in mtx recursion. To avoid that, delay if_addr_mtx acquisition until after > > mld_set_version() is called; while here, further reduce locking scope > > to protect only the needed pieces: if_multiaddrs, in6m_lookup_locked(). > > [...] > > -- > wbr, > pluknet > -- John Baldwin