LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Frédéric Weisbecker" <fweisbec@gmail.com>
To: "Steven Rostedt" <rostedt@goodmis.org>
Cc: "Linux Kernel" <linux-kernel@vger.kernel.org>,
"Ingo Molnar" <mingo@elte.hu>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Linus Torvalds" <torvalds@linux-foundation.org>
Subject: Re: [PATCH] ftrace: fix current_tracer error return
Date: Tue, 28 Oct 2008 16:35:11 +0100 [thread overview]
Message-ID: <c62985530810280835k66d3ab87qd1783a0135228174@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.10.0810281039130.29482@gandalf.stny.rr.com>
2008/10/28 Steven Rostedt <rostedt@goodmis.org>:
>
> The commit (in linux-tip) c2931e05ec5965597cbfb79ad332d4a29aeceb23
> ( ftrace: return an error when setting a nonexistent tracer )
> added useful code that would error when a bad tracer was written into
> the current_tracer file.
>
> But this had a bug if the amount written was more than the amount read by
> that code. The first iteration would set the tracer correctly, but since
> it did not consume the rest of what was written (usually whitespace), the
> userspace utility would continue to write what was not consumed. This
> second iteration would fail to find a tracer and return -EINVAL. Funny
> thing is that the tracer would have already been set.
>
> This patch just consumes all the data that is written to the file.
>
>
> Signed-off-by: Steven Rostedt <srostedt@redhat.com>
An that corrects the bug when I failed to assign the sched_switch tracer.
Thanks Steven!
Tested-by: Frederic Weisbecker <fweisbec@gmail.com>
next prev parent reply other threads:[~2008-10-28 15:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-27 23:18 Ftrace doesn't work anymore on latest tip Frédéric Weisbecker
2008-10-27 23:36 ` Steven Rostedt
2008-10-27 23:44 ` Frédéric Weisbecker
2008-10-28 9:02 ` Frédéric Weisbecker
2008-10-28 14:23 ` Steven Rostedt
2008-10-28 14:44 ` [PATCH] ftrace: fix current_tracer error return Steven Rostedt
2008-10-28 15:35 ` Frédéric Weisbecker [this message]
2008-10-28 15:41 ` Steven Rostedt
2008-10-28 18:15 ` Frédéric Weisbecker
2008-10-28 18:32 ` Steven Rostedt
2008-10-29 0:34 ` Frédéric Weisbecker
2008-10-29 0:55 ` Steven Rostedt
2008-10-29 1:09 ` Frédéric Weisbecker
2008-10-29 1:11 ` Steven Rostedt
2008-10-29 8:35 ` Ingo Molnar
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=c62985530810280835k66d3ab87qd1783a0135228174@mail.gmail.com \
--to=fweisbec@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
--subject='Re: [PATCH] ftrace: fix current_tracer error return' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).