Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Sep 2009 14:55:12 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r197328 - head/sys/netinet
Message-ID:  <200909191455.n8JEtCLC028300@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sat Sep 19 14:55:12 2009
New Revision: 197328
URL: http://svn.freebsd.org/changeset/base/197328

Log:
  Use appropriate locking when using interface list.
  
  Approved by: rrs (mentor)
  MFC after: 1 month.

Modified:
  head/sys/netinet/sctp_bsd_addr.c

Modified: head/sys/netinet/sctp_bsd_addr.c
==============================================================================
--- head/sys/netinet/sctp_bsd_addr.c	Sat Sep 19 14:18:42 2009	(r197327)
+++ head/sys/netinet/sctp_bsd_addr.c	Sat Sep 19 14:55:12 2009	(r197328)
@@ -208,9 +208,7 @@ sctp_init_ifns_for_vrf(int vrfid)
 	struct sctp_ifa *sctp_ifa;
 	uint32_t ifa_flags;
 
-#if 0
 	IFNET_RLOCK();
-#endif
 	TAILQ_FOREACH(ifn, &MODULE_GLOBAL(ifnet), if_list) {
 		IF_ADDR_LOCK(ifn);
 		TAILQ_FOREACH(ifa, &ifn->if_addrlist, ifa_list) {
@@ -256,9 +254,7 @@ sctp_init_ifns_for_vrf(int vrfid)
 		}
 		IF_ADDR_UNLOCK(ifn);
 	}
-#if 0
 	IFNET_RUNLOCK();
-#endif
 }
 
 void
@@ -344,9 +340,7 @@ void
 	struct ifnet *ifn;
 	struct ifaddr *ifa;
 
-#if 0
 	IFNET_RLOCK();
-#endif
 	TAILQ_FOREACH(ifn, &MODULE_GLOBAL(ifnet), if_list) {
 		if (!(*pred) (ifn)) {
 			continue;
@@ -355,9 +349,7 @@ void
 			sctp_addr_change(ifa, add ? RTM_ADD : RTM_DELETE);
 		}
 	}
-#if 0
 	IFNET_RUNLOCK();
-#endif
 }
 
 struct mbuf *



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