From owner-freebsd-current@FreeBSD.ORG Sun Aug 2 21:56:10 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 88968106564A for ; Sun, 2 Aug 2009 21:56:10 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6417F8FC12 for ; Sun, 2 Aug 2009 21:56:10 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 1C3AD46B2E; Sun, 2 Aug 2009 17:56:10 -0400 (EDT) Date: Sun, 2 Aug 2009 22:56:10 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Russell Cattelan In-Reply-To: <4A7320E1.4050308@thebarn.com> Message-ID: References: <4A7320E1.4050308@thebarn.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD Current Subject: Re: small fix to netatalk 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: Sun, 02 Aug 2009 21:56:10 -0000 On Fri, 31 Jul 2009, Russell Cattelan wrote: > starting up netatalk would panic the system with a lock not locked panic. > > It appears somebody reversed the 2 lock statements in netatalk/at_control.c Indeed -- almost certainly me, although there must be some differences in our netatalk setups as my box didn't panic in testing :-). I'll give it a more thorough spin locally and request RE permission to merge the patch tomorrow. Thanks! Robert N M Watson Computer Laboratory University of Cambridge > > diff --git a/sys/netatalk/at_control.c b/sys/netatalk/at_control.c > index 5193d66..b2d8422 100644 > - --- a/sys/netatalk/at_control.c > +++ b/sys/netatalk/at_control.c > @@ -276,7 +276,7 @@ at_control(struct socket *so, u_long cmd, caddr_t > data, struct ifnet *ifp, > * If the request is specifying phase 1, then > * only look at a phase one address > */ > - - AT_IFADDR_RUNLOCK(); > + AT_IFADDR_RLOCK(); > for (oaa = aa; aa; aa = TAILQ_NEXT(aa, aa_link)) { > if (aa->aa_ifp == ifp && > (aa->aa_flags & AFA_PHASE2) == 0) > @@ -286,7 +286,7 @@ at_control(struct socket *so, u_long cmd, caddr_t > data, struct ifnet *ifp, > ifa_free(&oaa->aa_ifa); > if (aa != NULL && oaa != aa) > ifa_ref(&aa->aa_ifa); > - - AT_IFADDR_RLOCK(); > + AT_IFADDR_RUNLOCK(); > } else { > struct at_ifaddr *oaa; > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (Darwin) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFKcyDhNRmM+OaGhBgRAnDKAJ0Ys2GMVJphbq6Qdgq6cvj85iKShwCfQsAE > P95+NxdFPwEjB/r0yQbTris= > =K0G2 > -----END PGP SIGNATURE----- > > _______________________________________________ > 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" >