lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 24 Oct 2014 00:55:08 -0700
From:	tip-bot for Kan Liang <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...nel.org,
	kan.liang@...el.com, acme@...hat.com, hpa@...or.com
Subject: [tip:perf/urgent] perf diff: Add missing hists__init()
  call at tool start

Commit-ID:  9ab1f50876dbb8b962db058259be7aae920d4c25
Gitweb:     http://git.kernel.org/tip/9ab1f50876dbb8b962db058259be7aae920d4c25
Author:     Kan Liang <kan.liang@...el.com>
AuthorDate: Wed, 22 Oct 2014 15:02:41 -0400
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 22 Oct 2014 16:31:06 -0300

perf diff: Add missing hists__init() call at tool start

It also uses hists/hist_entries, hists__init() should be called before
creating any evsels.

Otherwise no extra space will be allocated per perf_evsel nor this space
will be initialized when allocating a new perf_evsel instance, resulting
in reads/writes to non allocated space, oops. Fix it.

Signed-off-by: Kan Liang <kan.liang@...el.com>
Link: http://lkml.kernel.org/r/1414004561-22096-1-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/builtin-diff.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 8c5c11c..25114c9 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -1142,6 +1142,11 @@ static int data_init(int argc, const char **argv)
 
 int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused)
 {
+	int ret = hists__init();
+
+	if (ret < 0)
+		return ret;
+
 	perf_config(perf_default_config, NULL);
 
 	argc = parse_options(argc, argv, options, diff_usage, 0);
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ