Messages in this thread | | | Subject | Re: [PATCH 3/3] tracing: Check cpu file on tracing_release() | From | Steven Rostedt <> | Date | Tue, 09 Apr 2013 20:46:27 -0400 |
| |
On Wed, 2013-04-10 at 09:36 +0900, Namhyung Kim wrote:
> You meant iter->cpu_file != RING_BUFFER_ALL_CPUS case, right?
Yep.
> > So why bother trying to check other cpus then?
Because it's a very slow path (closing a file), and it keeps the code simpler and more condense.
We could add your change for consistency, but right now, its very low priority.
But looking at the code, I do see a clean up that looks like it would be worth updating. If the ring_buffer_read_prepare() fails, we should probably let the user know, instead of succeeding and then having no output.
Looks like all users of the buffer_iter[cpu] will fail quietly if it is NULL, thus it's not a problem with crashing the kernel.
-- Steve
| |