From owner-freebsd-current@FreeBSD.ORG Wed Aug 26 17:25:40 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23BEB106568F for ; Wed, 26 Aug 2009 17:25:40 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outU.internet-mail-service.net (outu.internet-mail-service.net [216.240.47.244]) by mx1.freebsd.org (Postfix) with ESMTP id 067AB8FC22 for ; Wed, 26 Aug 2009 17:25:39 +0000 (UTC) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 62F15B98AA; Wed, 26 Aug 2009 10:25:39 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id B5B952D6015; Wed, 26 Aug 2009 10:25:38 -0700 (PDT) Message-ID: <4A957012.8080400@elischer.org> Date: Wed, 26 Aug 2009 10:25:38 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: subbsd References: <200908261500.50132.subbsd@gmail.com> In-Reply-To: <200908261500.50132.subbsd@gmail.com> Content-Type: multipart/mixed; boundary="------------090506070809090402090109" Cc: freebsd-current@freebsd.org, Marko Zec Subject: Re: 8.0-BETA3 panic with vimage & lockd process X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Aug 2009 17:25:40 -0000 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--