From: Alexander Z Lam <azl@google.com>
To: Steven Rostedt <rostedt@goodmis.org>, linux-kernel@vger.kernel.org
Cc: Alexander Z Lam <azl@google.com>,
David Sharp <dhsharp@google.com>,
Vaibhav Nagarnaik <vnagarnaik@google.com>,
Alexander Z Lam <lambchop468@gmail.com>
Subject: [PATCH 2/2] tracing: Fix error handling to ensure instances can always be removed
Date: Wed, 10 Jul 2013 17:34:34 -0700 [thread overview]
Message-ID: <1373502874-1706-2-git-send-email-azl@google.com> (raw)
In-Reply-To: <1373502874-1706-1-git-send-email-azl@google.com>
Remove debugfs directories for tracing instances during creation if an error
occurs causing the trace_array for that instance to not be added to
ftrace_trace_arrays. If the directory continues to exist after the error, it
cannot be removed because the respective trace_array is not in
ftrace_trace_arrays.
Cc: Vaibhav Nagarnaik <vnagarnaik@google.com>
Cc: David Sharp <dhsharp@google.com>
Cc: Alexander Z Lam <lambchop468@gmail.com>
Signed-off-by: Alexander Z Lam <azl@google.com>
---
kernel/trace/trace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index ca2743b..4ea9967 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -5985,8 +5985,10 @@ static int new_instance_create(const char *name)
goto out_free_tr;
ret = event_trace_add_tracer(tr->dir, tr);
- if (ret)
+ if (ret) {
+ debugfs_remove_recursive(tr->dir);
goto out_free_tr;
+ }
init_tracer_debugfs(tr, tr->dir);
--
1.8.3
next prev parent reply other threads:[~2013-07-11 0:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-11 0:34 [PATCH 1/2] tracing: Miscellaneous fixes for trace_array ref counting Alexander Z Lam
2013-07-11 0:34 ` Alexander Z Lam [this message]
2013-07-18 16:40 ` [PATCH 2/2] tracing: Fix error handling to ensure instances can always be removed Steven Rostedt
2013-07-18 16:31 ` [PATCH 1/2] tracing: Miscellaneous fixes for trace_array ref counting Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1373502874-1706-2-git-send-email-azl@google.com \
--to=azl@google.com \
--cc=dhsharp@google.com \
--cc=lambchop468@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=vnagarnaik@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome