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: <55F6684F.4010007@huawei.com>
Date:	Mon, 14 Sep 2015 14:25:19 +0800
From:	Xishi Qiu <qiuxishi@...wei.com>
To:	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	<zhongjiang@...wei.com>
CC:	Linux MM <linux-mm@...ck.org>, LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] numa-balancing: fix confusion in /proc/sys/kernel/numa_balancing

We can only echo 0 or 1 > "/proc/sys/kernel/numa_balancing", usually 1 means
enable and 0 means disable. But when echo 1, it shows the value is 65536, this
is confusion.

Signed-off-by: Xishi Qiu <qiuxishi@...wei.com>
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 3595403..e97a348 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2135,7 +2135,7 @@ int sysctl_numa_balancing(struct ctl_table *table, int write,
 {
 	struct ctl_table t;
 	int err;
-	int state = numabalancing_enabled;
+	int state = !!numabalancing_enabled;
 
 	if (write && !capable(CAP_SYS_ADMIN))
 		return -EPERM;
-- 
2.0.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