From 5157862aa2791dbb3c5da7585fcdefac707e565c Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Fri, 26 Jun 2009 19:04:08 +0000 Subject: [PATCH] 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 --- sys/dev/cxgb/cxgb_adapter.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgb/cxgb_adapter.h b/sys/dev/cxgb/cxgb_adapter.h index 1e1e47ac9e02..2b25a34090c7 100644 --- a/sys/dev/cxgb/cxgb_adapter.h +++ b/sys/dev/cxgb/cxgb_adapter.h @@ -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);