mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, hpa@zytor.com,
	srostedt@redhat.com, tglx@linutronix.de,
	linux-tip-commits@vger.kernel.org
Subject: Re: [tip:tracing/urgent] tracing: Add pipe_close interface
Date: Wed, 09 Dec 2009 09:08:40 -0500	[thread overview]
Message-ID: <1260367720.2146.71.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20091209153204.F4CD.A69D9226@jp.fujitsu.com>

On Wed, 2009-12-09 at 15:35 +0900, KOSAKI Motohiro wrote:

> > diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> > index 874f289..f804b40 100644
> > --- a/kernel/trace/trace.c
> > +++ b/kernel/trace/trace.c
> > @@ -2898,6 +2898,10 @@ static int tracing_release_pipe(struct inode *inode, struct file *file)
> >  	else
> >  		cpumask_clear_cpu(iter->cpu_file, tracing_reader_cpumask);
> >  
> > +
> > +	if (iter->trace->pipe_open)
> > +		iter->trace->pipe_close(iter);
> > +
> 
> What's happen if pipe_close is NULL? Wny following straightforward check
> is wrong?
> I mean the above description explain pipe_close is only useful if plugin
> allocate something at pipe_open. then allowing NULL seems natural.
> 
> 	if (iter->trace->pipe_close)
> 		iter->trace->pipe_close(iter);

Ug, good point (stupid cut & paste should be illegal).

Ingo, I'll fix this up too in the next patch set. Want me to rebase it
or just start with this fix?

-- Steve





  reply	other threads:[~2009-12-09 14:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tip-c521efd1700a8c0f7ce26f011f5eaecca17fabfa@git.kernel.org>
2009-12-09  6:35 ` KOSAKI Motohiro
2009-12-09 14:08   ` Steven Rostedt [this message]
2009-12-09 14:16     ` Ingo Molnar
2009-12-10  7:48   ` [tip:tracing/core] tracing: Only call pipe_close if pipe_close is defined tip-bot for Steven Rostedt

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=1260367720.2146.71.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=hpa@zytor.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=srostedt@redhat.com \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®