Module Name:    src
Committed By:   njoly
Date:           Tue May 27 21:00:46 UTC 2014

Modified Files:
        src/sys/kern: sysv_shm.c

Log Message:
In shmrealloc(), add missing condvar initialisations for segments
copied from previous location.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/kern/sysv_shm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/sysv_shm.c
diff -u src/sys/kern/sysv_shm.c:1.124 src/sys/kern/sysv_shm.c:1.125
--- src/sys/kern/sysv_shm.c:1.124	Tue Feb 25 18:30:11 2014
+++ src/sys/kern/sysv_shm.c	Tue May 27 21:00:46 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysv_shm.c,v 1.124 2014/02/25 18:30:11 pooka Exp $	*/
+/*	$NetBSD: sysv_shm.c,v 1.125 2014/05/27 21:00:46 njoly Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2007 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysv_shm.c,v 1.124 2014/02/25 18:30:11 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_shm.c,v 1.125 2014/05/27 21:00:46 njoly Exp $");
 
 #define SYSVSHM
 
@@ -908,9 +908,11 @@ shmrealloc(int newshmni)
 	    ALIGN(newshmni * sizeof(struct shmid_ds)));
 
 	/* Copy all memory to the new area */
-	for (i = 0; i < shm_nused; i++)
+	for (i = 0; i < shm_nused; i++) {
+		cv_init(&newshm_cv[i], "shmwait");
 		(void)memcpy(&newshmsegs[i], &shmsegs[i],
 		    sizeof(newshmsegs[0]));
+	}
 
 	/* Mark as free all new segments, if there is any */
 	for (; i < newshmni; i++) {

Reply via email to