From: tip-bot for Dan Carpenter <error27@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
a.p.zijlstra@chello.nl, error27@gmail.com, tglx@linutronix.de,
mingo@elte.hu
Subject: [tip:perf/urgent] perf: Fix off by one in perf_swevent_init()
Date: Thu, 16 Dec 2010 10:42:45 GMT [thread overview]
Message-ID: <tip-ce677831a4abd0f9f957c90ac6f6a0d0472bafb4@git.kernel.org> (raw)
In-Reply-To: <20101024195041.GT5985@bicker>
Commit-ID: ce677831a4abd0f9f957c90ac6f6a0d0472bafb4
Gitweb: http://git.kernel.org/tip/ce677831a4abd0f9f957c90ac6f6a0d0472bafb4
Author: Dan Carpenter <error27@gmail.com>
AuthorDate: Sun, 24 Oct 2010 21:50:42 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 16 Dec 2010 11:14:31 +0100
perf: Fix off by one in perf_swevent_init()
The perf_swevent_enabled[] array has PERF_COUNT_SW_MAX elements.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20101024195041.GT5985@bicker>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/perf_event.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 7b87017..2870fee 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -4719,7 +4719,7 @@ static int perf_swevent_init(struct perf_event *event)
break;
}
- if (event_id > PERF_COUNT_SW_MAX)
+ if (event_id >= PERF_COUNT_SW_MAX)
return -ENOENT;
if (!event->parent) {
prev parent reply other threads:[~2010-12-16 10:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-24 19:50 [patch] perf: " Dan Carpenter
2010-12-13 19:46 ` Dan Carpenter
2010-12-13 22:38 ` Peter Zijlstra
2010-12-16 10:42 ` tip-bot for Dan Carpenter [this message]
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=tip-ce677831a4abd0f9f957c90ac6f6a0d0472bafb4@git.kernel.org \
--to=error27@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@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