[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c62985530810280835k66d3ab87qd1783a0135228174@mail.gmail.com>
Date: Tue, 28 Oct 2008 16:35:11 +0100
From: "Frédéric Weisbecker" <fweisbec@...il.com>
To: "Steven Rostedt" <rostedt@...dmis.org>
Cc: "Linux Kernel" <linux-kernel@...r.kernel.org>,
"Ingo Molnar" <mingo@...e.hu>,
"Andrew Morton" <akpm@...ux-foundation.org>,
"Linus Torvalds" <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] ftrace: fix current_tracer error return
2008/10/28 Steven Rostedt <rostedt@...dmis.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@...hat.com>
An that corrects the bug when I failed to assign the sched_switch tracer.
Thanks Steven!
Tested-by: Frederic Weisbecker <fweisbec@...il.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists