From owner-freebsd-stable@FreeBSD.ORG Wed Jun 22 13:19:48 2005 Return-Path: X-Original-To: freebsd-stable@FreeBSD.org Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E00D516A41C; Wed, 22 Jun 2005 13:19:48 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from relay.bestcom.ru (relay.bestcom.ru [217.72.144.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C72D43D1D; Wed, 22 Jun 2005 13:19:48 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (root@cell.sick.ru [217.72.144.68]) by relay.bestcom.ru (8.13.1/8.12.9) with ESMTP id j5MDJjr4065327 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 22 Jun 2005 17:19:46 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.1/8.12.8) with ESMTP id j5MDJjMO051386 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 22 Jun 2005 17:19:45 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.1/8.13.1/Submit) id j5MDJjri051385; Wed, 22 Jun 2005 17:19:45 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 22 Jun 2005 17:19:44 +0400 From: Gleb Smirnoff To: Andre Oppermann Message-ID: <20050622131944.GA51271@cell.sick.ru> References: <20050621070427.GA738@obiwan.tataz.chchile.org> <20050621090701.GB34406@cell.sick.ru> <20050621105154.GA36538@cell.sick.ru> <42B961B9.7A5856B3@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <42B961B9.7A5856B3@freebsd.org> User-Agent: Mutt/1.5.6i X-Virus-Scanned: ClamAV version devel-20050125, clamav-milter version 0.80ff on relay.bestcom.ru X-Virus-Status: Clean Cc: qingli@FreeBSD.org, sam@FreeBSD.org, Jeremie Le Hen , freebsd-stable@FreeBSD.org Subject: Re: panic in RELENG_5 UMA X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2005 13:19:49 -0000 On Wed, Jun 22, 2005 at 03:03:53PM +0200, Andre Oppermann wrote: A> > Fixing this one is harder. We take la from unlocked rtentry obtained via A> > rt_check(), or from arplookup(). The latter drops lock on rtentry, too. A> > Then we do some work and use this la. It may have already been freed in A> > arp_rtrequest(), the RTM_DELETE case. A> > A> > I see two approaches here: A> > A> > 1) Protecting llinfo with route lock. In this case we need rt_check() A> > to return locked *rt (just reference won't help). We also need A> > arplookup() to return locked rt. And do not unlock it withing all A> > arpresolve() and a big part of in_arpinput() functions. A> A> I think for 5-stable this is the way to go. I have started working on this. Making arplookup() to return locked rt looks possible. There are two more questions: - is it possible to make rt_check() to return locked *rt? This requires editing nd6.c, and if_*subr.c. We can't MFC this to RELENG_5. Probably, at first step I'll try to avoid changing rt_check and see whether changing arplookup() is enough to avoid panics. - Is the following statement always true? la->la_rt->rt_llinfo == la A> > 2) Add mutex to llinfo_arp. I'm afraid this will hurt performance. A> A> The new ARP stuff should fix these issues, however it is not ready yet. A> At the moment it looks like it wont make it right away into 6.0 but go A> into 7-current and then MFC'd back for 6.1R. Yeah. I've already compiled a kernel with it. It is bootable and working, but I haven't yet run hard tests. I'll work on locking now and perform testing. In general it looks much better than what we have now. The locking is going to be simple and straightforward. Thanks for nice code! Do you mind if I pull it into a perforce branch to work on it together? -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE