All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	"zhangwei(Jovi)" <jovi.zhangwei@huawei.com>,
	Ingo Molnar <mingo@redhat.com>,
	Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing/kprobe: Recover old array if fails to enable kprobe
Date: Fri, 28 Jun 2013 20:43:25 +0200	[thread overview]
Message-ID: <20130628184325.GA21822@redhat.com> (raw)
In-Reply-To: <1372430586.18733.332.camel@gandalf.local.home>

On 06/28, Steven Rostedt wrote:
>
> On Fri, 2013-06-28 at 16:27 +0200, Oleg Nesterov wrote:
> >
> > Ah, but this conflicts with the other changes I sent. They have
> > your acks, and iiuc Steven is going to apply them.
>
> I'll see if I can solve any conflicts. I need to get my -rt versions out
> and start on the new 3.6 stable today. Then after that, I plan on going
> though and getting all the tracing patches settled.

Thanks!

> > Besides, this fix is not complete afaics, we should also clear
> > TP_FLAG_TRACE/PROFILE if __enable_trace_probe() fails.

Yes.

And I forgot to mention, until we fix the races we discuss in another
thread, this WARN_ON() doesn't look right. So perhaps it would be
really better to delay this change a bit.

Oleg.

> > Perhaps you can do this later, on top of the pending changes?
> > 
> > Or. Given that this patch assumes that enable_kprobe() must succed,
> > can't we make a minimal change for now?
> > 
> > -------------------------------------------------------------------------------
> > [PATCH] tracing/kprobe: WARN() if enable_kprobe() fails.
> > 
> > enable_trace_probe() doesn't recover tp->files/flags if enable_kprobe()
> > fails, this looks confusing.
> > 
> > However, enable_kprobe() must not fail at this time except for unknown
> > bug or changing the implementation of enable_kprobe(), because usual
> > failure cases (not registered or gone) are already filtered.
> > 
> > So this patch simply adds WARN_ON(ret) to document this fact, even if
> > it makes sense to cleanup the logic anyway later.
> > 
> > Reported-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> > Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> > ---
> >  kernel/trace/trace_kprobe.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> > 
> > diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
> > index 5c070db..bb608b5 100644
> > --- a/kernel/trace/trace_kprobe.c
> > +++ b/kernel/trace/trace_kprobe.c
> > @@ -220,6 +220,7 @@ enable_trace_probe(struct trace_probe *tp, struct ftrace_event_file *file)
> >  			ret = enable_kretprobe(&tp->rp);
> >  		else
> >  			ret = enable_kprobe(&tp->rp.kp);
> > +		WARN_ON(ret);
> >  	}
> >   out:
> >  	return ret;
> 
> 


  reply	other threads:[~2013-06-28 18:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25  3:30 [PATCH 1/2 v3] tracing/uprobes: Support ftrace_event_file base multibuffer zhangwei(Jovi)
2013-06-25 10:18 ` Masami Hiramatsu
2013-06-25 20:24 ` Oleg Nesterov
2013-06-27 12:12 ` Srikar Dronamraju
2013-06-27 16:27   ` Oleg Nesterov
2013-06-28  4:17     ` Masami Hiramatsu
2013-06-28  5:56       ` Masami Hiramatsu
2013-06-28 13:04         ` [PATCH] tracing/kprobe: Recover old array if fails to enable kprobe Masami Hiramatsu
2013-06-28 14:27           ` Oleg Nesterov
2013-06-28 14:43             ` Steven Rostedt
2013-06-28 18:43               ` Oleg Nesterov [this message]
2013-06-30  7:46                 ` Masami Hiramatsu
2013-07-02 23:02                   ` Steven Rostedt
2013-07-03  2:10                     ` Masami Hiramatsu
2013-06-28 11:51       ` [PATCH 1/2 v3] tracing/uprobes: Support ftrace_event_file base multibuffer Steven Rostedt
2013-06-28 12:14         ` Masami Hiramatsu
2013-06-28 10:59   ` zhangwei(Jovi)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130628184325.GA21822@redhat.com \
    --to=oleg@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=jovi.zhangwei@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=srikar@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.