提交 86028598 编写于 作者: P Paul Mackerras

perfcounters/powerpc: fix oops with multiple counters in a group

Impact: fix oops-causing bug

This fixes a bug in the powerpc hw_perf_counter_init where the code
didn't initialize ctrs[n] before passing the ctrs array to check_excludes,
leading to possible oopses and other incorrect behaviour.  This fixes it
by initializing ctrs[n] correctly.
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 b5e8acf6
......@@ -633,6 +633,7 @@ hw_perf_counter_init(struct perf_counter *counter)
return NULL;
}
events[n] = ev;
ctrs[n] = counter;
if (check_excludes(ctrs, n, 1))
return NULL;
if (power_check_constraints(events, n + 1))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册