From 9ed47d01eb935541b9cafd369eb653c35cce7067 Mon Sep 17 00:00:00 2001 From: Jamie Gritton Date: Mon, 15 Jun 2009 19:01:53 +0000 Subject: 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) --- sys/compat/linux/linux_ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/compat/linux/linux_ioctl.c') diff --git a/sys/compat/linux/linux_ioctl.c b/sys/compat/linux/linux_ioctl.c index 685979e76b9d..fc3ce46e0323 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); /* -- cgit v1.2.3