aboutsummaryrefslogtreecommitdiff
path: root/sys/nfsclient/bootp_subr.c
diff options
context:
space:
mode:
authorJeffrey Hsu <hsu@FreeBSD.org>2002-12-22 05:35:03 +0000
committerJeffrey Hsu <hsu@FreeBSD.org>2002-12-22 05:35:03 +0000
commitb30a244c34af22d80a4fcba8aa7b423947f8ef42 (patch)
treed0f9ee7e6f9d8014e6f8f94ab6965e85c268792e /sys/nfsclient/bootp_subr.c
parent9991ea71785cc4e8661e8fee0aa7475726c7ad87 (diff)
downloadsrc-b30a244c34af22d80a4fcba8aa7b423947f8ef42.tar.gz
src-b30a244c34af22d80a4fcba8aa7b423947f8ef42.zip
SMP locking for ifnet list.
Notes
Notes: svn path=/head/; revision=108172
Diffstat (limited to 'sys/nfsclient/bootp_subr.c')
-rw-r--r--sys/nfsclient/bootp_subr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c
index a9c504f6bdcb..50f3b1f4dddc 100644
--- a/sys/nfsclient/bootp_subr.c
+++ b/sys/nfsclient/bootp_subr.c
@@ -401,6 +401,7 @@ bootpboot_p_iflist(void)
struct ifaddr *ifa;
printf("Interface list:\n");
+ IFNET_RLOCK(); /* could sleep, but okay for debugging XXX */
for (ifp = TAILQ_FIRST(&ifnet);
ifp != NULL;
ifp = TAILQ_NEXT(ifp, if_link)) {
@@ -410,6 +411,7 @@ bootpboot_p_iflist(void)
if (ifa->ifa_addr->sa_family == AF_INET)
bootpboot_p_if(ifp, ifa);
}
+ IFNET_RUNLOCK();
}
#endif /* defined(BOOTP_DEBUG) */
@@ -1689,6 +1691,7 @@ bootpc_init(void)
__XSTRING(BOOTP_WIRED_TO));
#endif
bzero(&ifctx->ireq, sizeof(ifctx->ireq));
+ IFNET_RLOCK();
for (ifp = TAILQ_FIRST(&ifnet);
ifp != NULL;
ifp = TAILQ_NEXT(ifp, if_link)) {
@@ -1712,6 +1715,7 @@ bootpc_init(void)
gctx->lastinterface = ifctx;
ifctx = allocifctx(gctx);
}
+ IFNET_RUNLOCK();
free(ifctx, M_TEMP);
if (gctx->interfaces == NULL) {