lkml.org 
[lkml]   [2013]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 3/4] tracing/kprobes: Fail to unregister if probe event files are open
On 08/01, Oleg Nesterov wrote:
>
> And just in case. I believe that the patch is fine.
>
> Just one off-topic note,

Forgot to mention,

> > @@ -632,7 +635,9 @@ static int release_all_trace_probes(void)
> > /* TODO: Use batch unregistration */
> > while (!list_empty(&probe_list)) {
> > tp = list_entry(probe_list.next, struct trace_probe, list);
> > - unregister_trace_probe(tp);
> > + ret = unregister_trace_probe(tp);
> > + if (ret)
> > + goto end;
> > free_trace_probe(tp);
> > }
>
> This obviously breaks all-or-nothing semantics (I mean, this breaks
> the intent, the current code is buggy).
>
> I think we can't avoid this, and I hope this is fine. But then perhaps
> we should simply remove the "list_for_each_entry" check above?

And, of course, turn this "while (!list_empty())" into list_for_each_safe().

But again, this is almost off-topic and we can do this later.

Oleg.



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