8.0-BETA3 panic with vimage & lockd process
Julian Elischer
julian at elischer.org
Wed Aug 26 17:25:40 UTC 2009
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 at freebsd.org mailing list
>>> http://lists.freebsd.org/mailman/listinfo/freebsd-current
>>> To unsubscribe, send any mail to "freebsd-current-unsubscribe at 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..
-------------- next part --------------
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);
More information about the freebsd-current
mailing list