[for-next][PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Steven Rostedt
From: Oleg Nesterov The usage of uprobe_buffer_enable() added by dcad1a20 is very wrong, 1. uprobe_buffer_enable() and uprobe_buffer_disable() are not balanced, _enable() should be called only if !enabled. 2. If uprobe_buffer_enable() fails probe_event_enable() should clear tp.flags and

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Steven Rostedt
On Mon, 30 Jun 2014 19:58:36 +0200 Oleg Nesterov wrote: > But I won't insist, this is subjective. So please let me know if you still > think it would be better to add this change, I'll send v2. Don't bother. I didn't look at the patch in context to make that reply. I think your original patch

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Steven Rostedt
On Mon, 30 Jun 2014 19:50:25 +0200 Oleg Nesterov wrote: > Well, I do not really mind. But to me it looks more consistent this way, > if-something-fail-goto-err_label. > > IOW, I think that the code should either not use err-labels, or always > use them like above. Ah I missed the other error

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Oleg Nesterov
On 06/30, Steven Rostedt wrote: > > On Mon, 30 Jun 2014 22:34:09 +0530 > Srikar Dronamraju wrote: > > > > + if (ret) > > > + goto err_buffer; > > > > > > + return 0; > > > + > > > + err_buffer: > > > + uprobe_buffer_disable(); > > > + > > > > How about avoiding err_buffer label? > > +

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Oleg Nesterov
On 06/30, Srikar Dronamraju wrote: > > > The usage of uprobe_buffer_enable() added by dcad1a20 is very wrong, > > > > 1. uprobe_buffer_enable() and uprobe_buffer_disable() are not balanced, > >_enable() should be called only if !enabled. > > > > 2. If uprobe_buffer_enable() fails

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Steven Rostedt
On Mon, 30 Jun 2014 22:34:09 +0530 Srikar Dronamraju wrote: > Acked-by: Srikar Dronamraju > (one nit .. ) > > > + ret = uprobe_buffer_enable(); > > + if (ret) > > + goto err_flags; > > + > > tu->consumer.filter = filter; > > ret = uprobe_register(tu->inode, tu->offset,

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Srikar Dronamraju
> The usage of uprobe_buffer_enable() added by dcad1a20 is very wrong, > > 1. uprobe_buffer_enable() and uprobe_buffer_disable() are not balanced, >_enable() should be called only if !enabled. > > 2. If uprobe_buffer_enable() fails probe_event_enable() should clear >tp.flags and free

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Masami Hiramatsu
(2014/06/28 2:01), Oleg Nesterov wrote: > The usage of uprobe_buffer_enable() added by dcad1a20 is very wrong, > > 1. uprobe_buffer_enable() and uprobe_buffer_disable() are not balanced, >_enable() should be called only if !enabled. > > 2. If uprobe_buffer_enable() fails probe_event_enable()

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Namhyung Kim
On Fri, 27 Jun 2014 19:01:46 +0200, Oleg Nesterov wrote: > The usage of uprobe_buffer_enable() added by dcad1a20 is very wrong, > > 1. uprobe_buffer_enable() and uprobe_buffer_disable() are not balanced, >_enable() should be called only if !enabled. > > 2. If uprobe_buffer_enable() fails

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Namhyung Kim
On Fri, 27 Jun 2014 19:01:46 +0200, Oleg Nesterov wrote: The usage of uprobe_buffer_enable() added by dcad1a20 is very wrong, 1. uprobe_buffer_enable() and uprobe_buffer_disable() are not balanced, _enable() should be called only if !enabled. 2. If uprobe_buffer_enable() fails

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Masami Hiramatsu
(2014/06/28 2:01), Oleg Nesterov wrote: The usage of uprobe_buffer_enable() added by dcad1a20 is very wrong, 1. uprobe_buffer_enable() and uprobe_buffer_disable() are not balanced, _enable() should be called only if !enabled. 2. If uprobe_buffer_enable() fails probe_event_enable()

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Srikar Dronamraju
The usage of uprobe_buffer_enable() added by dcad1a20 is very wrong, 1. uprobe_buffer_enable() and uprobe_buffer_disable() are not balanced, _enable() should be called only if !enabled. 2. If uprobe_buffer_enable() fails probe_event_enable() should clear tp.flags and free

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Steven Rostedt
On Mon, 30 Jun 2014 22:34:09 +0530 Srikar Dronamraju sri...@linux.vnet.ibm.com wrote: Acked-by: Srikar Dronamraju sri...@linux.vnet.ibm.com (one nit .. ) + ret = uprobe_buffer_enable(); + if (ret) + goto err_flags; + tu-consumer.filter = filter; ret =

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Oleg Nesterov
On 06/30, Srikar Dronamraju wrote: The usage of uprobe_buffer_enable() added by dcad1a20 is very wrong, 1. uprobe_buffer_enable() and uprobe_buffer_disable() are not balanced, _enable() should be called only if !enabled. 2. If uprobe_buffer_enable() fails probe_event_enable()

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Oleg Nesterov
On 06/30, Steven Rostedt wrote: On Mon, 30 Jun 2014 22:34:09 +0530 Srikar Dronamraju sri...@linux.vnet.ibm.com wrote: + if (ret) + goto err_buffer; + return 0; + + err_buffer: + uprobe_buffer_disable(); + How about avoiding err_buffer label? + if (!ret)

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Steven Rostedt
On Mon, 30 Jun 2014 19:50:25 +0200 Oleg Nesterov o...@redhat.com wrote: Well, I do not really mind. But to me it looks more consistent this way, if-something-fail-goto-err_label. IOW, I think that the code should either not use err-labels, or always use them like above. Ah I missed the

Re: [PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Steven Rostedt
On Mon, 30 Jun 2014 19:58:36 +0200 Oleg Nesterov o...@redhat.com wrote: But I won't insist, this is subjective. So please let me know if you still think it would be better to add this change, I'll send v2. Don't bother. I didn't look at the patch in context to make that reply. I think your

[for-next][PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-30 Thread Steven Rostedt
From: Oleg Nesterov o...@redhat.com The usage of uprobe_buffer_enable() added by dcad1a20 is very wrong, 1. uprobe_buffer_enable() and uprobe_buffer_disable() are not balanced, _enable() should be called only if !enabled. 2. If uprobe_buffer_enable() fails probe_event_enable() should clear

[PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-27 Thread Oleg Nesterov
The usage of uprobe_buffer_enable() added by dcad1a20 is very wrong, 1. uprobe_buffer_enable() and uprobe_buffer_disable() are not balanced, _enable() should be called only if !enabled. 2. If uprobe_buffer_enable() fails probe_event_enable() should clear tp.flags and free event_file_link.

[PATCH 4/4] tracing/uprobes: Fix the usage of uprobe_buffer_enable() in probe_event_enable()

2014-06-27 Thread Oleg Nesterov
The usage of uprobe_buffer_enable() added by dcad1a20 is very wrong, 1. uprobe_buffer_enable() and uprobe_buffer_disable() are not balanced, _enable() should be called only if !enabled. 2. If uprobe_buffer_enable() fails probe_event_enable() should clear tp.flags and free event_file_link.