From owner-freebsd-stable@FreeBSD.ORG Tue Sep 23 10:19:31 2008 Return-Path: Delivered-To: stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E5A31065670 for ; Tue, 23 Sep 2008 10:19:31 +0000 (UTC) (envelope-from lioux-list@uol.com.br) Received: from smtp.uol.com.br (smtpout5.uol.com.br [200.221.4.196]) by mx1.freebsd.org (Postfix) with ESMTP id 1FE238FC19 for ; Tue, 23 Sep 2008 10:19:30 +0000 (UTC) (envelope-from lioux-list@uol.com.br) Received: from localhost (localhost [127.0.0.1]) by socom5.uol.com.br (Postfix) with ESMTP id 4A95F565 for ; Tue, 23 Sep 2008 07:05:54 -0300 (BRT) Received: from 201.88.58.13 (201-88-58-13.bsace702.dsl.brasiltelecom.net.br [201.88.58.13]) by socom5.uol.com.br (Postfix) with ESMTP id BB1285F9 for ; Tue, 23 Sep 2008 07:05:53 -0300 (BRT) Received: (qmail 14399 invoked from network); 23 Sep 2008 07:05:30 -0300 Received: from unknown (HELO exxodus.fedaykin.here) (127.0.0.1) by exxodus.fedaykin.here with SMTP; 23 Sep 2008 07:05:30 -0300 Message-ID: <48D8BF69.6060206@uol.com.br> Date: Tue, 23 Sep 2008 07:05:29 -0300 From: Mario Sergio Fujikawa Ferreira User-Agent: Thunderbird 2.0.0.16 (X11/20080802) MIME-Version: 1.0 To: Robert Watson References: (sfid-20080922_05543_31152F2E) In-Reply-To: (sfid-20080922_05543_31152F2E) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SIG5: 12a97db36798ace547330aca6452eea7 Cc: Norbert Papke , stable@FreeBSD.org Subject: Re: Possible UDP deadlock/panic fix X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2008 10:19:31 -0000 Hi, That seems to be working. I've been up and running for 7 hours now with your patch. The machine is a bit slow but I have both WITNESS and INVARIANTS enabled so as to make sure everything is fine. Rergads, Mario Robert Watson wrote: > > Attached is an MFC candidate for a patch I just merged to 8.x, which > corrects the UDP lock recursion issue both of you were running into. If > it settles well for a couple of days in HEAD then I'll go ahead and > request an MFC from re@, but your confirmation as to whether or not this > corrects the specific symptoms you are seeing would be very helpful. I > was able to confirm that it eliminated what appeared to be the same > problem here when I attempted to reproduce it based on the information > you provided, so I'm hopeful.\ > > Thanks, > > Robert N M Watson > Computer Laboratory > University of Cambridge > > > Property changes on: . > ___________________________________________________________________ > Modified: svn:mergeinfo > Merged /head/sys:r183265 > > Index: netinet6/udp6_usrreq.c > =================================================================== > --- netinet6/udp6_usrreq.c (revision 183265) > +++ netinet6/udp6_usrreq.c (working copy) > @@ -975,13 +975,23 @@ > error = EINVAL; > goto out; > } > + > + /* > + * XXXRW: We release UDP-layer locks before calling > + * udp_send() in order to avoid recursion. However, > + * this does mean there is a short window where inp's > + * fields are unstable. Could this lead to a > + * potential race in which the factors causing us to > + * select the UDPv4 output routine are invalidated? > + */ > + INP_WUNLOCK(inp); > + INP_INFO_WUNLOCK(&udbinfo); > if (sin6) > in6_sin6_2_sin_in_sock(addr); > pru = inetsw[ip_protox[IPPROTO_UDP]].pr_usrreqs; > - error = ((*pru->pru_send)(so, flags, m, addr, control, > + /* addr will just be freed in sendit(). */ > + return ((*pru->pru_send)(so, flags, m, addr, control, > td)); > - /* addr will just be freed in sendit(). */ > - goto out; > } > } > #endif > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >