summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort00fcxen <t00fcxen@9df1edf5-d72c-5b5f-11c0-5f5209eb73f7>2013-11-30 09:42:49 +0000
committert00fcxen <t00fcxen@9df1edf5-d72c-5b5f-11c0-5f5209eb73f7>2013-11-30 09:42:49 +0000
commite78707be97c950c0b5842e20e28ebc8a7e9635e6 (patch)
tree6413ff95f511c256bfaab4fc813164e6459ca52b
parentde91ed386d1b5f46ff1b86f855ccc811c2837d96 (diff)
downloadusrsctplib-e78707be97c950c0b5842e20e28ebc8a7e9635e6.tar.gz
Backport r25874
git-svn-id: http://sctp-refimpl.googlecode.com/svn/trunk/KERN/usrsctp/usrsctplib@8736 9df1edf5-d72c-5b5f-11c0-5f5209eb73f7
-rwxr-xr-xnetinet/sctp_pcb.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/netinet/sctp_pcb.c b/netinet/sctp_pcb.c
index d721b88..aca1ce4 100755
--- a/netinet/sctp_pcb.c
+++ b/netinet/sctp_pcb.c
@@ -6736,8 +6736,14 @@ sctp_pcb_init()
for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) {
LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]);
}
- SCTP_ITERATOR_LOCK_INIT();
- SCTP_IPI_ITERATOR_WQ_INIT();
+ /*
+ * Only initialize non-VNET global mutexes for the
+ * default instance.
+ */
+ if (IS_DEFAULT_VNET(curvnet)) {
+ SCTP_ITERATOR_LOCK_INIT();
+ SCTP_IPI_ITERATOR_WQ_INIT();
+ }
#if defined(SCTP_PROCESS_LEVEL_LOCKS)
#if defined(__Userspace_os_Windows)
InitializeConditionVariable(&sctp_it_ctl.iterator_wakeup);