mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	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, 9 Dec 2009 15:16:19 +0100	[thread overview]
Message-ID: <20091209141619.GA21862@elte.hu> (raw)
In-Reply-To: <1260367720.2146.71.camel@gandalf.stny.rr.com>


* Steven Rostedt <rostedt@goodmis.org> wrote:

> 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?

I'd suggest to start with a fix. Thanks,

	Ingo

  reply	other threads:[~2009-12-09 14:16 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
2009-12-09 14:16     ` Ingo Molnar [this message]
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=20091209141619.GA21862@elte.hu \
    --to=mingo@elte.hu \
    --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=rostedt@goodmis.org \
    --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

Powered by JetHome