Use if_maddr_rlock() instead of IF_ADDR_LOCK() to protect access to

if_multiaddrs in if_cxgb.

Approved by:	re (kib)
MFC after:	6 weeks
This commit is contained in:
Robert Watson 2009-06-26 19:04:08 +00:00
parent ba16a0fab1
commit 5157862aa2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=195071

View File

@ -467,7 +467,7 @@ t3_get_next_mcaddr(struct t3_rx_mode *rm)
struct ifmultiaddr *ifma;
int i = 0;
IF_ADDR_LOCK(ifp);
if_maddr_rlock(ifp);
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
if (ifma->ifma_addr->sa_family != AF_LINK)
continue;
@ -477,8 +477,7 @@ t3_get_next_mcaddr(struct t3_rx_mode *rm)
}
i++;
}
IF_ADDR_UNLOCK(ifp);
if_maddr_runlock(ifp);
rm->idx++;
return (macaddr);