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: <1376486495-21457-1-git-send-email-gergely@risko.hu>
Date:	Wed, 14 Aug 2013 15:21:35 +0200
From:	Gergely Risko <gergely@...ko.hu>
To:	cgroups@...r.kernel.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org
Cc:	torvalds@...ux-foundation.org, Gergely Risko <gergely@...ko.hu>
Subject: [PATCH] mm: memcontrol: fix handling of swapaccount parameter

Fixed swap accounting option parsing to enable if called without argument.

Signed-off-by: Gergely Risko <gergely@...ko.hu>
---
 mm/memcontrol.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index c290a1c..8ec2507 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -6970,13 +6970,13 @@ struct cgroup_subsys mem_cgroup_subsys = {
 static int __init enable_swap_account(char *s)
 {
 	/* consider enabled if no parameter or 1 is given */
-	if (!strcmp(s, "1"))
+	if (*s++ != '=' || !*s || !strcmp(s, "1"))
 		really_do_swap_account = 1;
 	else if (!strcmp(s, "0"))
 		really_do_swap_account = 0;
 	return 1;
 }
-__setup("swapaccount=", enable_swap_account);
+__setup("swapaccount", enable_swap_account);
 
 static void __init memsw_file_init(void)
 {
-- 
1.8.3.2

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