From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 16:25:09 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 489781065734; Fri, 9 Jan 2009 16:25:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 594F28FC24; Fri, 9 Jan 2009 16:25:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id BD88941C64C; Fri, 9 Jan 2009 17:25:05 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id 7kZgFqBh10br; Fri, 9 Jan 2009 17:25:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 6B73341C670; Fri, 9 Jan 2009 17:25:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id CC3E34448DD; Fri, 9 Jan 2009 16:24:11 +0000 (UTC) Date: Fri, 9 Jan 2009 16:24:11 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <200901091622.n09GMWFp061580@svn.freebsd.org> Message-ID: <20090109162328.W45399@maildrop.int.zabbadoz.net> References: <200901091622.n09GMWFp061580@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r186956 - head/sys/net 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: Fri, 09 Jan 2009 16:25:10 -0000 On Fri, 9 Jan 2009, Bjoern A. Zeeb wrote: > Author: bz > Date: Fri Jan 9 16:22:32 2009 > New Revision: 186956 > URL: http://svn.freebsd.org/changeset/base/186956 > > Log: > Take the cred from curthread rather than curproc as curproc would need > locking but the credential from curthread (usually) never changes. While there declare the static function static there as well. > Discussed with: jhb > MFC after: 2 weeks > > Modified: > head/sys/net/rtsock.c > > Modified: head/sys/net/rtsock.c > ============================================================================== > --- head/sys/net/rtsock.c Fri Jan 9 16:02:19 2009 (r186955) > +++ head/sys/net/rtsock.c Fri Jan 9 16:22:32 2009 (r186956) > @@ -1344,7 +1344,7 @@ done: > return (error); > } > > -int > +static int > sysctl_ifmalist(int af, struct walkarg *w) > { > INIT_VNET_NET(curvnet); > @@ -1365,8 +1365,8 @@ sysctl_ifmalist(int af, struct walkarg * > TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { > if (af && af != ifma->ifma_addr->sa_family) > continue; > - if (jailed(curproc->p_ucred) && > - !prison_if(curproc->p_ucred, ifma->ifma_addr)) > + if (jailed(curthread->td_ucred) && > + !prison_if(curthread->td_ucred, ifma->ifma_addr)) > continue; > info.rti_info[RTAX_IFA] = ifma->ifma_addr; > info.rti_info[RTAX_GATEWAY] = > -- Bjoern A. Zeeb The greatest risk is not taking one.