Skip to content

Commit

Permalink
jump label: Initialize workqueue tracepoints *before* they are regist…
Browse files Browse the repository at this point in the history
…ered

Initialize the workqueue data structures *before* they are registered
so that they are ready for callbacks.

Signed-off-by: Jason Baron <jbaron@redhat.com>
LKML-Reference: <e3a3383fc370ac7086625bebe89d9480d7caf372.1284733808.git.jbaron@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Jason Baron authored and Steven Rostedt committed Sep 22, 2010
1 parent bf5438f commit e0cf0cd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions kernel/trace/trace_workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@ int __init trace_workqueue_early_init(void)
{
int ret, cpu;

for_each_possible_cpu(cpu) {
spin_lock_init(&workqueue_cpu_stat(cpu)->lock);
INIT_LIST_HEAD(&workqueue_cpu_stat(cpu)->list);
}

ret = register_trace_workqueue_insertion(probe_workqueue_insertion, NULL);
if (ret)
goto out;
Expand All @@ -279,11 +284,6 @@ int __init trace_workqueue_early_init(void)
if (ret)
goto no_creation;

for_each_possible_cpu(cpu) {
spin_lock_init(&workqueue_cpu_stat(cpu)->lock);
INIT_LIST_HEAD(&workqueue_cpu_stat(cpu)->list);
}

return 0;

no_creation:
Expand Down

0 comments on commit e0cf0cd

Please sign in to comment.