lkml.org 
[lkml]   [2013]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH? trace_remove_event_call() should fail if call is active
On 07/03, Steven Rostedt wrote:
>
> On Wed, 2013-07-03 at 16:34 -0400, Steven Rostedt wrote:
> > OK, what about the below patch, followed by an updated version of your
> > patch. I'll send that as a reply to this one.
>
> This is a modification of your patch:

Thanks.

> If you like it, please add a proper change log and SOB tag. Oh, and we
> need to still update trace_kprobes.c

and trace_uprobes.c. Please find the changelog below.


tracing: trace_remove_event_call() should fail if call/file is in use

Change trace_remove_event_call(call) to return the error if this
call is active. This is what the callers assume but can't verify
outside of the tracing locks. Both trace_kprobe.c/trace_uprobe.c
need the additional changes, unregister_trace_probe() should abort
if trace_remove_event_call() fails.

We also check TRACE_EVENT_FL_REF_MASK to ensure that nobody opened
the files we are going to remove, these means that nobody can access
the soon-to-be-freed ftrace_event_file/call via filp->private_data.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>



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