Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Jul 2009 11:50:41 -0500
From:      Russell Cattelan <cattelan@thebarn.com>
To:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   small fix to netatalk
Message-ID:  <4A7320E1.4050308@thebarn.com>

next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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

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-----




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A7320E1.4050308>