From owner-freebsd-current@FreeBSD.ORG Thu Apr 30 21:43:31 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5280D1065696; Thu, 30 Apr 2009 21:43:31 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 1BAC18FC08; Thu, 30 Apr 2009 21:43:31 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id AE3F5337E31; Thu, 30 Apr 2009 17:43:30 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Thu, 30 Apr 2009 17:43:30 -0400 X-Sasl-enc: vL3MlywznobtbYcXMzscPC8JuJ7iMBJEsEiIK3Jq65/h 1241127810 Received: from anglepoise.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 92C223C1FB; Thu, 30 Apr 2009 17:43:29 -0400 (EDT) Message-ID: <49FA1B7E.7060201@incunabulum.net> Date: Thu, 30 Apr 2009 22:43:26 +0100 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.21 (X11/20090406) MIME-Version: 1.0 To: David Wolfskill , Chagin Dmitry , Robert Watson , current@freebsd.org References: <20090430155408.GX1387@albert.catwhisker.org> <20090430204828.GA6551@dchagin.static.corbina.ru> <20090430213621.GA61978@albert.catwhisker.org> In-Reply-To: <20090430213621.GA61978@albert.catwhisker.org> Content-Type: multipart/mixed; boundary="------------080402050100010602080202" Cc: Subject: Re: Panic: witness_warn (r191682; shared rw udpinp (udpinp)...netinet6/udp6_usrreq.c:360) 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: Thu, 30 Apr 2009 21:43:31 -0000 This is a multi-part message in MIME format. --------------080402050100010602080202 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit David Wolfskill wrote: > ... > I believe that qualifies as Goodness, as I was able to use ssh to > access the machine, so it's definitely up in multi-user mode. > Hi, Can you try this patch? This patch is probably more correct -- but you can see my intent was to avoid thrashing the INP lock on mcast delivery. INP lock use in that routine is goopy to read. That'll teach me to do things from memory for IPv4... bah! :-) cheers BMS --------------080402050100010602080202 Content-Type: text/plain; name="udp6inplock.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="udp6inplock.diff" Index: udp6_usrreq.c =================================================================== --- udp6_usrreq.c (revision 191705) +++ udp6_usrreq.c (working copy) @@ -279,8 +279,6 @@ continue; } - INP_RLOCK(inp); - /* * Handle socket delivery policy for any-source * and source-specific multicast. [RFC3678] @@ -290,6 +288,8 @@ struct sockaddr_in6 mcaddr; int blocked; + INP_RLOCK(inp); + bzero(&mcaddr, sizeof(struct sockaddr_in6)); mcaddr.sin6_len = sizeof(struct sockaddr_in6); mcaddr.sin6_family = AF_INET6; @@ -304,9 +304,11 @@ if (blocked == MCAST_NOTSMEMBER || blocked == MCAST_MUTED) UDPSTAT_INC(udps_filtermcast); - INP_RUNLOCK(inp); + INP_RUNLOCK(inp); /* XXX */ continue; } + + INP_RUNLOCK(inp); } if (last != NULL) { struct mbuf *n; @@ -423,8 +425,6 @@ return (IPPROTO_DONE); badheadlocked: - if (inp) - INP_RUNLOCK(inp); INP_INFO_RUNLOCK(&V_udbinfo); badunlocked: if (m) --------------080402050100010602080202--