From owner-svn-src-head@FreeBSD.ORG Thu Aug 2 21:33:47 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C545106564A; Thu, 2 Aug 2012 21:33:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 7D7E08FC14; Thu, 2 Aug 2012 21:33:46 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q72LXiek081440; Fri, 3 Aug 2012 01:33:44 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q72LXiSg081439; Fri, 3 Aug 2012 01:33:44 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 3 Aug 2012 01:33:44 +0400 From: Gleb Smirnoff To: "Bjoern A. Zeeb" Message-ID: <20120802213344.GF70185@FreeBSD.org> References: <201208021357.q72DvoFJ088426@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r238990 - in head/sys: net netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2012 21:33:47 -0000 On Thu, Aug 02, 2012 at 04:46:42PM +0000, Bjoern A. Zeeb wrote: B> On Thu, 2 Aug 2012, Gleb Smirnoff wrote: B> B> > Author: glebius B> > Date: Thu Aug 2 13:57:49 2012 B> > New Revision: 238990 B> > URL: http://svn.freebsd.org/changeset/base/238990 B> > B> > Log: B> > Fix races between in_lltable_prefix_free(), lla_lookup(), B> > llentry_free() and arptimer(): B> > B> > o Use callout_init_rw() for lle timeout, this allows us safely B> > disestablish them. B> > - This allows us to simplify the arptimer() and make it B> > race safe. B> > o Consistently use ifp->if_afdata_lock to lock access to B> > linked lists in the lle hashes. B> > o Introduce new lle flag LLE_LINKED, which marks an entry that B> > is attached to the hash. B> > - Use LLE_LINKED to avoid double unlinking via consequent B> > calls to llentry_free(). B> > - Mark lle with LLE_DELETED via |= operation istead of =, B> > so that other flags won't be lost. B> > o Make LLE_ADDREF(), LLE_REMREF() and LLE_FREE_LOCKED() more B> > consistent and provide more informative KASSERTs. B> > B> > The patch is a collaborative work of all submitters and myself. B> B> Quoting from 2 year old memory you just introduced a possible deadlock B> on tbale (or with that networkstack) teardown adding the extra af_data B> write locking to the table walk. Can you please give more details? I didn't get it. What else needs afdata lock and what does it hold which is held by table walk. -- Totus tuus, Glebius.