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>] [day] [month] [year] [list]
Date:	Mon, 23 Jul 2012 11:27:34 +0800
From:	Wanpeng Li <liwanp@...ux.vnet.ibm.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Fengguang Wu <fengguang.wu@...el.com>,
	Seth Jennings <sjenning@...ux.vnet.ibm.com>,
	"Kirill A. Shutemov" <kirill@...temov.name>, linux-mm@...ck.org,
	Michal Hocko <mhocko@...e.cz>,
	Johannes Weiner <hannes@...xchg.org>,
	KAMEZAWAHiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Gavin Shan <shangw@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org,
	Wanpeng Li <liwanp@...ux.vnet.ibm.com>
Subject: [PATCH] memcg: fix mm/memcontrol.c build error against linux-next

As Fengguang Wu reported, linux-next failed to build with 

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm
head:   37e2ad4953983527f7bdb6831bf478eedcc84082
commit: 442d53f161093de78f0aafcd3ec2a6345de42890 [164/309] memcg: add mem_cgroup_from_css() helper

mem_cgroup_from_css() is defined inside CONFIG_MEMCG_KMEM and used
outside of it, move mem_cgroup_from_css() out of the #ifdef 
CONFIG_MEMCG_KMEM can address this issue.

Reported-by: Fengguang Wu <fengguang.wu@...el.com>
Reported-by: Seth Jennings <sjenning@...ux.vnet.ibm.com>
Signed-off-by: Wanpeng Li <liwanp@...ux.vnet.ibm.com>

---
 mm/memcontrol.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 439190b..994e353 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -405,17 +405,17 @@ enum charge_type {
 static void mem_cgroup_get(struct mem_cgroup *memcg);
 static void mem_cgroup_put(struct mem_cgroup *memcg);
 
-/* Writing them here to avoid exposing memcg's inner layout */
-#ifdef CONFIG_MEMCG_KMEM
-#include <net/sock.h>
-#include <net/ip.h>
-
 static inline
 struct mem_cgroup *mem_cgroup_from_css(struct cgroup_subsys_state *s)
 {
 	return container_of(s, struct mem_cgroup, css);
 }
 
+/* Writing them here to avoid exposing memcg's inner layout */
+#ifdef CONFIG_MEMCG_KMEM
+#include <net/sock.h>
+#include <net/ip.h>
+
 static bool mem_cgroup_is_root(struct mem_cgroup *memcg);
 void sock_update_memcg(struct sock *sk)
 {
-- 
1.7.7.6

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