Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Aug 2009 10:25:38 -0700
From:      Julian Elischer <julian@elischer.org>
To:        subbsd <subbsd@gmail.com>
Cc:        freebsd-current@freebsd.org, Marko Zec <zec@FreeBSD.org>
Subject:   Re: 8.0-BETA3 panic with vimage & lockd process
Message-ID:  <4A957012.8080400@elischer.org>
In-Reply-To: <200908261500.50132.subbsd@gmail.com>
References:  <200908261500.50132.subbsd@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------090506070809090402090109
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

subbsd wrote:
> Julian Elischer wrote:
>>> subbsd wrote:
>>>> Hello  maillist
>>>>
>>>> ive got sililar problem like http://lists.freebsd.org/pipermail/freebsd-
>>>> virtualization/2008-May/000010.html
>>>>
>>> is this -current or 8-beta3?  and if current, how new?
>>> _______________________________________________
>>> freebsd-current@freebsd.org mailing list
>>> http://lists.freebsd.org/mailman/listinfo/freebsd-current
>>> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
>> sorry should have read hte subject line!
>>
>> any chance you can try a -current kernel?
>>
>> there are some fixes there that will go in to 8.x soon.
> 
> Yes, jumping to 
> 
> kern.osrelease: 9.0-CURRENT
> kern.osrevision: 199506
> 
> fix problem with lockd.
> 
> But net/skype (running without root privileges) application make kernel panic 
> anyway with VIMAGE options.
> ...
> 

ah intersting..
yes I can see what the problem is..
  thanks..

try the attached patch and get back to me..


--------------090506070809090402090109
Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="linux.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="linux.diff"

Index: compat/linux/linux_ioctl.c
===================================================================
--- compat/linux/linux_ioctl.c	(revision 196425)
+++ compat/linux/linux_ioctl.c	(working copy)
@@ -2067,16 +2067,20 @@
 
 	/* Determine the (relative) unit number for ethernet interfaces */
 	ethno = 0;
+
+	CURVNET_SET(TD_TO_VNET(curthread));
 	IFNET_RLOCK();
 	TAILQ_FOREACH(ifscan, &V_ifnet, if_link) {
 		if (ifscan == ifp) {
 			IFNET_RUNLOCK();
+			CURVNET_RESTORE();
 			return (snprintf(buffer, buflen, "eth%d", ethno));
 		}
 		if (IFP_IS_ETH(ifscan))
 			ethno++;
 	}
 	IFNET_RUNLOCK();
+	CURVNET_RESTORE();
 
 	return (0);
 }
@@ -2106,6 +2110,7 @@
 		return (NULL);
 	index = 0;
 	is_eth = (len == 3 && !strncmp(lxname, "eth", len)) ? 1 : 0;
+	CURVNET_SET(TD_TO_VNET(curthread));
 	IFNET_RLOCK();
 	TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
 		/*
@@ -2119,6 +2124,7 @@
 			break;
 	}
 	IFNET_RUNLOCK();
+	CURVNET_RESTORE();
 	if (ifp != NULL)
 		strlcpy(bsdname, ifp->if_xname, IFNAMSIZ);
 	return (ifp);
@@ -2151,6 +2157,8 @@
 	/* handle the 'request buffer size' case */
 	if (ifc.ifc_buf == PTROUT(NULL)) {
 		ifc.ifc_len = 0;
+		CURVNET_SET(TD_TO_VNET(curthread));
+		IFNET_RLOCK();
 		TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
 			TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
 				struct sockaddr *sa = ifa->ifa_addr;
@@ -2158,6 +2166,8 @@
 					ifc.ifc_len += sizeof(ifr);
 			}
 		}
+		IFNET_RUNLOCK();
+		CURVNET_RESTORE();
 		error = copyout(&ifc, uifc, sizeof(ifc));
 		return (error);
 	}
@@ -2177,6 +2187,7 @@
 	valid_len = 0;
 
 	/* Return all AF_INET addresses of all interfaces */
+	CURVNET_SET(TD_TO_VNET(curthread));
 	IFNET_RLOCK();		/* could sleep XXX */
 	TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
 		int addrs = 0;
@@ -2214,6 +2225,7 @@
 		}
 	}
 	IFNET_RUNLOCK();
+	CURVNET_RESTORE();
 
 	if (valid_len != max_len && !full) {
 		sbuf_delete(sb);

--------------090506070809090402090109--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A957012.8080400>