lttng-modules: ltt_trace_destroy calls ltt_lock_traces internally so
this non-recursive mutex must be first unlocked when executing error
handling code.
Signed-off-by: Juha Niskanen <juha_niskanen@mentor.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
if (IS_ERR_VALUE(err)) {
printk(KERN_ERR "setup_trace_write: "
"_create_trace_control_dir failed: %d\n", err);
+ ltt_unlock_traces();
+ ltt_trace_destroy(trace_name);
goto err_create_trace_control_dir;
}
free_page((unsigned long)trace_name);
return count;
-err_create_trace_control_dir:
- ltt_trace_destroy(trace_name);
err_setup_trace:
ltt_unlock_traces();
+err_create_trace_control_dir:
mutex_unlock(&control_lock);
err_get_tracename:
err_copy_from_user: