public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Richter <rric@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Jiri Olsa <jolsa@redhat.com>, Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 16/16] perf, persistent: Allow multiple users for an event
Date: Fri, 7 Jun 2013 15:47:16 +0200	[thread overview]
Message-ID: <20130607134716.GG3886@rric.localhost> (raw)
In-Reply-To: <20130604093522.GD23640@pd.tnic>

On 04.06.13 11:35:22, Borislav Petkov wrote:
> On Tue, Jun 04, 2013 at 11:19:21AM +0200, Jiri Olsa wrote:
> > 'cpu' did not pass ay check here..
> 
> Oh, I see.
> 
> You mean something like
> 
> 	if (cpu < NR_CPUS && cpu_online(cpu))

In perf_event_alloc() there is:

        if ((unsigned)cpu >= nr_cpu_ids) {
                if (!task || cpu != -1)
                        return ERR_PTR(-EINVAL);
        }

So this should be sufficient:

	if ((unsigned)cpu >= nr_cpu_ids)
		...

-Robert

  reply	other threads:[~2013-06-07 13:47 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-31  8:47 [PATCH 00/16] perf, persistent: Kernel updates for perf tool integration Robert Richter
2013-05-31  8:47 ` [PATCH 01/16] perf, persistent: Fix build error for no-tracepoints configs Robert Richter
2013-05-31  9:05   ` Borislav Petkov
2013-05-31  8:47 ` [PATCH 02/16] perf, persistent: Fix attr size Robert Richter
2013-05-31  9:05   ` Borislav Petkov
2013-05-31  8:47 ` [PATCH 03/16] perf, persistent: Setting default buffer size to 512k as in perf tools Robert Richter
2013-05-31  9:07   ` Borislav Petkov
2013-05-31  8:47 ` [PATCH 04/16] perf, persistent: Print error code on failure when adding events Robert Richter
2013-05-31  9:10   ` Borislav Petkov
2013-05-31  8:47 ` [PATCH 05/16] perf, persistent: Return resonable error code Robert Richter
2013-05-31  9:11   ` Borislav Petkov
2013-05-31  8:47 ` [PATCH 06/16] perf, persistent: Return -EACCES if mapped buffers must be readonly Robert Richter
2013-05-31  9:12   ` Borislav Petkov
2013-05-31  8:47 ` [PATCH 07/16] perf, persistent: Rework struct pers_event_desc Robert Richter
2013-05-31  8:47 ` [PATCH 08/16] perf, persistent: Remove rb_put() Robert Richter
2013-05-31  8:47 ` [PATCH 09/16] perf, persistent: Introduce get_persistent_event() Robert Richter
2013-05-31  8:47 ` [PATCH 10/16] perf, persistent: Reworking perf_get_persistent_event_fd() Robert Richter
2013-05-31  8:47 ` [PATCH 11/16] perf, persistent: Protect event lists with mutex Robert Richter
2013-05-31  8:47 ` [PATCH 12/16] perf, persistent: Avoid adding identical events Robert Richter
2013-05-31  8:47 ` [PATCH 13/16] perf, persistent: Implementing a persistent pmu Robert Richter
2013-05-31  8:47 ` [PATCH 14/16] perf, persistent: Name each persistent event Robert Richter
2013-05-31  8:47 ` [PATCH 15/16] perf, persistent: Exposing persistent events using sysfs Robert Richter
2013-05-31  8:47 ` [PATCH 16/16] perf, persistent: Allow multiple users for an event Robert Richter
2013-06-03 13:49   ` Jiri Olsa
2013-06-04  8:20     ` Borislav Petkov
2013-06-04  9:19       ` Jiri Olsa
2013-06-04  9:35         ` Borislav Petkov
2013-06-07 13:47           ` Robert Richter [this message]
2013-05-31  9:15 ` [PATCH 00/16] perf, persistent: Kernel updates for perf tool integration Borislav Petkov
2013-05-31  9:32   ` Robert Richter
2013-05-31 12:21     ` Borislav Petkov
2013-06-01 16:15       ` Robert Richter
2013-06-02  7:29         ` Borislav Petkov

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=20130607134716.GG3886@rric.localhost \
    --to=rric@kernel.org \
    --cc=acme@ghostprotocols.net \
    --cc=bp@alien8.de \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.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