From: tip-bot for Eric Dumazet <eric.dumazet@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
eric.dumazet@gmail.com, stable@kernel.org, tglx@linutronix.de,
mingo@elte.hu
Subject: [tip:perf/urgent] perf tools: Fix buffer allocation
Date: Thu, 24 Sep 2009 13:16:21 GMT [thread overview]
Message-ID: <tip-a255a9981a8566a1efabec983b7811e937e662d2@git.kernel.org> (raw)
In-Reply-To: <4ABB6EB7.7000002@gmail.com>
Commit-ID: a255a9981a8566a1efabec983b7811e937e662d2
Gitweb: http://git.kernel.org/tip/a255a9981a8566a1efabec983b7811e937e662d2
Author: Eric Dumazet <eric.dumazet@gmail.com>
AuthorDate: Thu, 24 Sep 2009 15:05:59 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 24 Sep 2009 15:11:23 +0200
perf tools: Fix buffer allocation
"perf top" cores dump on my dev machine, if run from a directory
where vmlinux is present:
*** glibc detected *** malloc(): memory corruption: 0x085670d0 ***
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: <stable@kernel.org>
LKML-Reference: <4ABB6EB7.7000002@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/util/module.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/util/module.c b/tools/perf/util/module.c
index 8f81622..0d8c85d 100644
--- a/tools/perf/util/module.c
+++ b/tools/perf/util/module.c
@@ -423,7 +423,7 @@ static int mod_dso__load_module_paths(struct mod_dso *self)
len += strlen(uts.release);
len += strlen("/modules.dep");
- dpath = calloc(1, len);
+ dpath = calloc(1, len + 1);
if (dpath == NULL)
return err;
prev parent reply other threads:[~2009-09-24 13:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-24 13:05 [PATCH] perf tools: fix " Eric Dumazet
2009-09-24 13:12 ` Ingo Molnar
2009-09-24 13:13 ` Eric Dumazet
2009-09-24 13:39 ` [PATCH] perf tools: Dont use openat() Eric Dumazet
2009-09-24 19:20 ` Ingo Molnar
2009-09-24 19:25 ` [tip:perf/urgent] " tip-bot for Eric Dumazet
2009-09-24 21:07 ` [PATCH] " Ulrich Drepper
2009-09-24 21:50 ` Eric Dumazet
2009-09-26 15:01 ` Ingo Molnar
2009-09-24 13:16 ` tip-bot for Eric Dumazet [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-a255a9981a8566a1efabec983b7811e937e662d2@git.kernel.org \
--to=eric.dumazet@gmail.com \
--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=stable@kernel.org \
--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