Skip to contentSkip to conversation

radix-tree tests: properly initialize mutex

PATCH In review [email protected] 1 participant 1 message Oct 11, 2016 Xarray

lore
Share & tools
lore
#0 lore raw

PATCH 8/102 radix-tree tests: properly initialize mutex

From: Ross Zwisler <[email protected]>
Subject: radix-tree tests: properly initialize mutex

The pthread_mutex_t in regression1.c wasn't being initialized properly.

---

 tools/testing/radix-tree/regression1.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/radix-tree/regression1.c renamed from tools/testing/radix-tree/regression1.c~radix-tree-tests-properly-initialize-mutex +1 -1
diff -puN tools/testing/radix-tree/regression1.c~radix-tree-tests-properly-initialize-mutex tools/testing/radix-tree/regression1.c
@@ -43,7 +43,7 @@
 #include "regression.h"
 
 static RADIX_TREE(mt_tree, GFP_KERNEL);
-static pthread_mutex_t mt_lock;
+static pthread_mutex_t mt_lock = PTHREAD_MUTEX_INITIALIZER;
 
 struct page {
 	pthread_mutex_t lock;

_