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
This commit is contained in:
Bjoern A. Zeeb 2009-01-09 16:22:32 +00:00
parent be9347e3fe
commit ebda3fc380
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=186956

View File

@ -1344,7 +1344,7 @@ sysctl_iflist(int af, struct walkarg *w)
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 *w)
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] =