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: <1311599418-1915-1-git-send-email-yong.zhang0@gmail.com>
Date:	Mon, 25 Jul 2011 21:10:18 +0800
From:	Yong Zhang <yong.zhang0@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Keika Kobayashi <kobayashi.kk@...s.nec.co.jp>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
Subject: [PATCH] proc/softirqs: only show state for online cpus

Like /proc/interrupts, no need to output data for nobody.

Signed-off-by: Yong Zhang <yong.zhang0@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Keika Kobayashi <kobayashi.kk@...s.nec.co.jp>
Cc: KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
---
 fs/proc/softirqs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/proc/softirqs.c b/fs/proc/softirqs.c
index 62604be..2b32b46 100644
--- a/fs/proc/softirqs.c
+++ b/fs/proc/softirqs.c
@@ -11,13 +11,13 @@ static int show_softirqs(struct seq_file *p, void *v)
 	int i, j;
 
 	seq_puts(p, "                    ");
-	for_each_possible_cpu(i)
+	for_each_online_cpu(i)
 		seq_printf(p, "CPU%-8d", i);
 	seq_putc(p, '\n');
 
 	for (i = 0; i < NR_SOFTIRQS; i++) {
 		seq_printf(p, "%12s:", softirq_to_name[i]);
-		for_each_possible_cpu(j)
+		for_each_online_cpu(j)
 			seq_printf(p, " %10u", kstat_softirqs_cpu(i, j));
 		seq_putc(p, '\n');
 	}
-- 
1.7.4.1

--
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