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]
Date:	Wed, 14 Dec 2011 18:07:52 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	David Miller <davem@...emloft.net>, <netdev@...r.kernel.org>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Glauber Costa <glommer@...allels.com>,
	Tejun Heo <tj@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: linux-next: build failure after merge of the final tree (net-next
 tree related)

Hi ,

After merging the final tree, today's linux-next build (powerpc
allnoconfig) failed like this:

In file included from include/linux/tcp.h:211:0,
                 from include/linux/ipv6.h:221,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:26,
                 from include/linux/nfs_fs.h:50,
                 from init/do_mounts.c:20:
include/net/sock.h: In function 'memcg_memory_allocated_add':
include/net/sock.h:1000:20: error: 'OVER_LIMIT' undeclared (first use in this function)

And several other similar ones.

Caused by commit e1aab161e013 ("socket: initial cgroup code") from the
net-next tree. OVER_LIMIT is only defined it CONFIG_INET is set.

I applied the following (stupid) patch for today (just because reverting
the above commit would probably be too hard - we have cgroup stuff all
over the place :-( ):

From: Stephen Rothwell <sfr@...b.auug.org.au>
Date: Wed, 14 Dec 2011 18:01:12 +1100
Subject: [PATCH] socket: bad fix for cgroup code breakage

Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
---
 include/net/sock.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/include/net/sock.h b/include/net/sock.h
index 6fe0dae..0603973 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -986,6 +986,7 @@ static inline long sk_prot_mem_limits(const struct sock *sk, int index)
 	return prot[index];
 }
 
+#ifdef CONFIG_INET
 static inline void memcg_memory_allocated_add(struct cg_proto *prot,
 					      unsigned long amt,
 					      int *parent_status)
@@ -999,6 +1000,7 @@ static inline void memcg_memory_allocated_add(struct cg_proto *prot,
 	if (ret < 0)
 		*parent_status = OVER_LIMIT;
 }
+#endif
 
 static inline void memcg_memory_allocated_sub(struct cg_proto *prot,
 					      unsigned long amt)
@@ -1028,12 +1030,14 @@ sk_memory_allocated_add(struct sock *sk, int amt, int *parent_status)
 {
 	struct proto *prot = sk->sk_prot;
 
+#ifdef CONFIG_INET
 	if (mem_cgroup_sockets_enabled && sk->sk_cgrp) {
 		memcg_memory_allocated_add(sk->sk_cgrp, amt, parent_status);
 		/* update the root cgroup regardless */
 		atomic_long_add_return(amt, prot->memory_allocated);
 		return memcg_memory_allocated_read(sk->sk_cgrp);
 	}
+#endif
 
 	return atomic_long_add_return(amt, prot->memory_allocated);
 }
@@ -1043,9 +1047,11 @@ sk_memory_allocated_sub(struct sock *sk, int amt, int parent_status)
 {
 	struct proto *prot = sk->sk_prot;
 
+#ifdef CONFIG_INET
 	if (mem_cgroup_sockets_enabled && sk->sk_cgrp &&
 	    parent_status != OVER_LIMIT) /* Otherwise was uncharged already */
 		memcg_memory_allocated_sub(sk->sk_cgrp, amt);
+#endif
 
 	atomic_long_sub(amt, prot->memory_allocated);
 }
-- 
1.7.7.3

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au
http://www.canb.auug.org.au/~sfr/

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ