public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Namhyung Kim <namhyung@gmail.com>
Cc: Nelson Elhage <nelhage@nelhage.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] perf: __perf_evlist__mmap: Fix errno value on failed map.
Date: Tue, 20 Dec 2011 15:55:57 -0200	[thread overview]
Message-ID: <20111220175557.GA21838@infradead.org> (raw)
In-Reply-To: <87k45sr2yd.fsf@gmail.com>

Em Tue, Dec 20, 2011 at 12:33:30AM +0900, Namhyung Kim escreveu:
> >  	evlist->mmap[idx].base = mmap(NULL, evlist->mmap_len, prot,
> >  				      MAP_SHARED, fd, 0);
> > -	if (evlist->mmap[idx].base == MAP_FAILED)
> > +	if (evlist->mmap[idx].base == MAP_FAILED) {
> > +		evlist->mmap[idx].base = NULL;
> >  		return -1;
> > +	}
> >  
> >  	perf_evlist__add_pollfd(evlist, fd);
> >  	return 0;
> 
> Thanks for fixing this. I posted a basically same patch for this [1]
> last week, but it seems my patch doesn't get included yet (right?),
> and your patch looks bit simpler. So Arnaldo, I'm totally fine if you
> decide to take this instead of mine.

Yeah, Nelson's seems more simple, so I'm applying his and adding your
Acked-by,

Thanks,
 
> Thanks.
> Namhyung Kim
> 
> 
> [1] https://lkml.org/lkml/2011/12/12/275

  parent reply	other threads:[~2011-12-20 17:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19 13:39 [PATCH 0/3] perf: builtin-record: Be more helpful when running up against mlock limits Nelson Elhage
2011-12-19 13:39 ` [PATCH 1/3] perf: __perf_evlist__mmap: Fix errno value on failed map Nelson Elhage
2011-12-19 15:33   ` Namhyung Kim
2011-12-19 16:29     ` Arnaldo Carvalho de Melo
2011-12-20 17:55     ` Arnaldo Carvalho de Melo [this message]
2011-12-21  8:43   ` [tip:perf/core] perf evlist: Fix errno value reporting on failed mmap tip-bot for Nelson Elhage
2011-12-19 13:39 ` [PATCH 2/3] perf: builtin-record: Provide advice if mmap'ing fails with EPERM Nelson Elhage
2011-12-29 20:50   ` [tip:perf/core] perf: builtin-record: Provide advice if mmap' ing " tip-bot for Nelson Elhage
2011-12-19 13:39 ` [PATCH 3/3] perf: builtin-record: Document and check that mmap_pages must be a power of two Nelson Elhage
2011-12-29 20:50   ` [tip:perf/core] " tip-bot for Nelson Elhage

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=20111220175557.GA21838@infradead.org \
    --to=acme@ghostprotocols.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=namhyung@gmail.com \
    --cc=nelhage@nelhage.com \
    --cc=paulus@samba.org \
    /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