summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_ioctl.c
diff options
context:
space:
mode:
authorjamie <jamie@FreeBSD.org>2009-06-15 19:01:53 +0000
committerjamie <jamie@FreeBSD.org>2009-06-15 19:01:53 +0000
commitf950eed7d778168cbdc3411fb2604c92e03531b8 (patch)
treea6d05b7f6dd58090ebf3e1b0556017742e4368b1 /sys/compat/linux/linux_ioctl.c
parent5675a54fb1a409499766ce55a009367c043fdc28 (diff)
downloadFreeBSD-src-f950eed7d778168cbdc3411fb2604c92e03531b8.zip
FreeBSD-src-f950eed7d778168cbdc3411fb2604c92e03531b8.tar.gz
Get vnets from creds instead of threads where they're available, and from
passed threads instead of curthread. Reviewed by: zec, julian Approved by: bz (mentor)
Diffstat (limited to 'sys/compat/linux/linux_ioctl.c')
-rw-r--r--sys/compat/linux/linux_ioctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c
index 685979e..fc3ce46 100644
--- a/sys/compat/linux/linux_ioctl.c
+++ b/sys/compat/linux/linux_ioctl.c
@@ -2091,9 +2091,9 @@ linux_ifname(struct ifnet *ifp, char *buffer, size_t buflen)
*/
static struct ifnet *
-ifname_linux_to_bsd(const char *lxname, char *bsdname)
+ifname_linux_to_bsd(struct thread *td, const char *lxname, char *bsdname)
{
- INIT_VNET_NET(TD_TO_VNET(curthread));
+ INIT_VNET_NET(TD_TO_VNET(td));
struct ifnet *ifp;
int len, unit;
char *ep;
@@ -2379,7 +2379,7 @@ linux_ioctl_socket(struct thread *td, struct linux_ioctl_args *args)
printf("%s(): ioctl %d on %.*s\n", __func__,
args->cmd & 0xffff, LINUX_IFNAMSIZ, lifname);
#endif
- ifp = ifname_linux_to_bsd(lifname, ifname);
+ ifp = ifname_linux_to_bsd(td, lifname, ifname);
if (ifp == NULL)
return (EINVAL);
/*
OpenPOWER on IntegriCloud