Date: Fri, 9 Jan 2009 16:22:32 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r186956 - head/sys/net Message-ID: <200901091622.n09GMWFp061580@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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. 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] =
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901091622.n09GMWFp061580>