From: Max Filippov <jcmvbkbc@gmail.com>
To: Mischa Jonker <mjonker@synopsys.com>, Vineet Gupta <vgupta@synopsys.com>
Cc: linux-kernel@vger.kernel.org, Max Filippov <jcmvbkbc@gmail.com>
Subject: arc_pmu not initialized in the arc/kernel/perf_event.c?
Date: Sun, 14 Jun 2015 02:09:06 +0300 [thread overview]
Message-ID: <1434236946-15326-1-git-send-email-jcmvbkbc@gmail.com> (raw)
Mischa, Vineet,
Looking at ARC PMU driver I've got an impression that its static arc_pmu
is left uninitialized, which possibly leads to Oops once registered
callbacks are invoked. I don't have neither ARC toolchain nor hardware to
test it, so I may be missing something. Below is the fix for it.
Thanks.
-- Max
---8<---
From: Max Filippov <jcmvbkbc@gmail.com>
Subject: [PATCH] arc: fix use of uninitialized arc_pmu
static arc_pmu in the arch/arc/kernel/perf_event.c is not initialized as
it's shadowed by a local variable of the same name in the
arc_pmu_device_probe.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
arch/arc/kernel/perf_event.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c
index fd2ec50..57b58f5 100644
--- a/arch/arc/kernel/perf_event.c
+++ b/arch/arc/kernel/perf_event.c
@@ -266,7 +266,6 @@ static int arc_pmu_add(struct perf_event *event, int flags)
static int arc_pmu_device_probe(struct platform_device *pdev)
{
- struct arc_pmu *arc_pmu;
struct arc_reg_pct_build pct_bcr;
struct arc_reg_cc_build cc_bcr;
int i, j, ret;
--
1.8.1.4
next reply other threads:[~2015-06-13 23:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-13 23:09 Max Filippov [this message]
2015-06-15 5:50 ` Vineet Gupta
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=1434236946-15326-1-git-send-email-jcmvbkbc@gmail.com \
--to=jcmvbkbc@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjonker@synopsys.com \
--cc=vgupta@synopsys.com \
/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®