Reverse misordered unlock and lock in at_control for netatalk phase I

addresses.

Submitted by:	Russell Cattelan <cattelan at thebarn.com>
Approved by:	re (kib)
This commit is contained in:
Robert Watson 2009-08-12 10:44:13 +00:00
parent d19d55a76f
commit c1aee61218
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=196121

View File

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