瀏覽代碼

perfcounters: fix init context lock

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Ingo Molnar 16 年之前
父節點
當前提交
78b6084c90
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      include/linux/init_task.h

+ 3 - 1
include/linux/init_task.h

@@ -116,7 +116,9 @@ extern struct group_info init_groups;
 #ifdef CONFIG_PERF_COUNTERS
 # define INIT_PERF_COUNTERS(tsk)					\
 	.perf_counter_ctx.counter_list =				\
-		LIST_HEAD_INIT(tsk.perf_counter_ctx.counter_list),
+		LIST_HEAD_INIT(tsk.perf_counter_ctx.counter_list),	\
+	.perf_counter_ctx.lock =					\
+		__SPIN_LOCK_UNLOCKED(tsk.perf_counter_ctx.lock),
 #else
 # define INIT_PERF_COUNTERS(tsk)
 #endif