lkml.org 
[lkml]   [2013]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/1] tracing: Simplify trace_array_get()
From
Date
On Fri, 2013-07-19 at 19:20 +0200, Oleg Nesterov wrote:

> Yes. But unless I missed something again this logic doesn't look exactly
> correct. Because it seems that trace_array_get() can succeed when it
> shoudn't.
>
> trace_array_get() can race with instance_delete() + new_instance_create(),
> and _create()->kzalloc() can return the same memory which was freed by
> _delete().
>
> No?

Correct, but I don't see that as a major problem, do you?

What would happen in that case, is that an event might be enabled or
disabled in another buffer instance. As that can only happen by the root
user, it would be the root user doing multiple things at the same time
to cause it. They might get a strange result at worse, but that would
also mean they were trying to add and delete instances while reading
those same instances. Bad root, bad!

-- Steve




\
 
 \ /
  Last update: 2013-07-19 20:21    [W:0.074 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site