[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-060664f3b9dff37860e48b5158e8429b2467e526@git.kernel.org>
Date: Fri, 26 Jun 2015 01:43:47 -0700
From: tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, namhyung@...nel.org,
ak@...ux.intel.com, hpa@...or.com, dsahern@...il.com,
tglx@...utronix.de, acme@...hat.com, jolsa@...nel.org,
mingo@...nel.org, adrian.hunter@...el.com, a.p.zijlstra@...llo.nl,
eranian@...gle.com
Subject: [tip:perf/urgent] perf tools:
Future-proof thread_map allocation size calculation
Commit-ID: 060664f3b9dff37860e48b5158e8429b2467e526
Gitweb: http://git.kernel.org/tip/060664f3b9dff37860e48b5158e8429b2467e526
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Thu, 25 Jun 2015 14:48:49 -0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 25 Jun 2015 15:15:49 -0300
perf tools: Future-proof thread_map allocation size calculation
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Andi Kleen <ak@...ux.intel.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/r/20150625174840.GH3253@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/thread_map.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/thread_map.c b/tools/perf/util/thread_map.c
index 8c3c3a0..920136d 100644
--- a/tools/perf/util/thread_map.c
+++ b/tools/perf/util/thread_map.c
@@ -22,7 +22,7 @@ static int filter(const struct dirent *dir)
static struct thread_map *thread_map__realloc(struct thread_map *map, int nr)
{
- size_t size = sizeof(*map) + sizeof(pid_t) * nr;
+ size_t size = sizeof(*map) + sizeof(map->map[0]) * nr;
return realloc(map, size);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists