From owner-cvs-src@FreeBSD.ORG Sat Sep 27 19:33:50 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FE5E1065686; Sat, 27 Sep 2008 19:33:50 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 170508FC1B; Sat, 27 Sep 2008 19:33:50 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTP id 9DFD146B03; Sat, 27 Sep 2008 15:33:49 -0400 (EDT) Date: Sat, 27 Sep 2008 20:33:49 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ganbold In-Reply-To: Message-ID: References: <200809271014.m8RAENka041457@repoman.freebsd.org> <48DE5C4F.8040807@micom.mng.net> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet ip_fw2.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: Sat, 27 Sep 2008 19:33:50 -0000 On Sat, 27 Sep 2008, Robert Watson wrote: >>> Rather than shadowing global variable 'lookup' in check_uidgid(), >>> rename >>> it to ugid_lookupp. This should make debugging issues with ipfw uid >>> rules easier. >> >> Still panics: > > Something seems odd here, we may be looking at an ipfw bug. The goal of > passing down the inpcb is that ipfw doesn't have to look it up (and hence > avoids acquiring locks in ipfw on the outbound path) -- the stack arguments > clearly show it held in ipfw, but locks are acquired anyway. This > particular change was purely cosmetic, but I'll review the ipfw code more > closely and see about a fix... Indeed -- when an inpcb doesn't have a socket, ipfw will go ahead and do a lookup for an inpcb even though one is passed down. I've committed a change that short-circuits that and marks the credential lookup as failed. Give it a try now? Robert N M Watson Computer Laboratory University of Cambridge