提交 02e176af 编写于 作者: D Daniel Baluta 提交者: Arnaldo Carvalho de Melo

perf/hwbp: Fix cleanup in case of kzalloc failure

Obviously this is a typo and could result in memory leaks if kzalloc
fails on a given cpu.
Signed-off-by: NDaniel Baluta <dbaluta@ixiacom.com>
Acked-by: NFrederic Weisbecker <fweisbec@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1360186160-7566-1-git-send-email-dbaluta@ixiacom.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 85df3b37
......@@ -676,7 +676,7 @@ int __init init_hw_breakpoint(void)
err_alloc:
for_each_possible_cpu(err_cpu) {
for (i = 0; i < TYPE_MAX; i++)
kfree(per_cpu(nr_task_bp_pinned[i], cpu));
kfree(per_cpu(nr_task_bp_pinned[i], err_cpu));
if (err_cpu == cpu)
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册