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-next>] [day] [month] [year] [list]
Message-Id: <20190228153719.23411-1-ravi.bangoria@linux.ibm.com>
Date:   Thu, 28 Feb 2019 21:07:19 +0530
From:   Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
To:     acme@...nel.org
Cc:     alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
        namhyung@...nel.org, eranian@...gle.com,
        linux-kernel@...r.kernel.org, tonyj@...e.com, nasastry@...ibm.com,
        Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
Subject: [PATCH] perf c2c: Fix c2c report for empty numa node

perf c2c report fails if system has empty numa node(0 cpus):

  $ lscpu
  NUMA node0 CPU(s):   
  NUMA node1 CPU(s):   0-4

  $ sudo ./perf c2c report 
  node/cpu topology bugFailed setup nodes

Fix this.

Reported-by: Nageswara R Sastry <nasastry@...ibm.com>
Signed-off-by: Ravi Bangoria <ravi.bangoria@...ux.ibm.com>
---
 tools/perf/util/cpumap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c
index 383674f448fc..517c3f37c613 100644
--- a/tools/perf/util/cpumap.c
+++ b/tools/perf/util/cpumap.c
@@ -261,7 +261,7 @@ struct cpu_map *cpu_map__dummy_new(void)
 	struct cpu_map *cpus = malloc(sizeof(*cpus) + sizeof(int));
 
 	if (cpus != NULL) {
-		cpus->nr = 1;
+		cpus->nr = 0;
 		cpus->map[0] = -1;
 		refcount_set(&cpus->refcnt, 1);
 	}
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ