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: <DB7PR02MB397977A2959BFFA89AA67538BB840@DB7PR02MB3979.eurprd02.prod.outlook.com>
Date:   Tue, 24 Sep 2019 08:46:48 +0000
From:   Mircea CIRJALIU - MELIU <mcirjaliu@...defender.com>
To:     "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "cl@...ux.com" <cl@...ux.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] slab, memcontrol: undefined reference to
 `memcg_kmem_get_cache'

Having CONFIG_MEMCG turned off causes these issues:
	mm/slub.o: In function `slab_pre_alloc_hook':
	/home/mircea/build/mm/slab.h:425: undefined reference to `memcg_kmem_get_cache'
	mm/slub.o: In function `slab_post_alloc_hook':
	/home/mircea/build/mm/slab.h:444: undefined reference to `memcg_kmem_put_cache'

diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 1dcb763..61a1391 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -1265,10 +1265,10 @@ static inline bool mem_cgroup_under_socket_pressure(struct mem_cgroup *memcg)
 }
 #endif

+#ifdef CONFIG_MEMCG_KMEM
 struct kmem_cache *memcg_kmem_get_cache(struct kmem_cache *cachep);
 void memcg_kmem_put_cache(struct kmem_cache *cachep);

-#ifdef CONFIG_MEMCG_KMEM
 int __memcg_kmem_charge(struct page *page, gfp_t gfp, int order);
 void __memcg_kmem_uncharge(struct page *page, int order);
 int __memcg_kmem_charge_memcg(struct page *page, gfp_t gfp, int order,
@@ -1329,6 +1329,14 @@ extern int memcg_expand_shrinker_maps(int new_id);
 extern void memcg_set_shrinker_bit(struct mem_cgroup *memcg,
                                   int nid, int shrinker_id);
 #else
+static inline struct kmem_cache *memcg_kmem_get_cache(struct kmem_cache *cachep)
+{
+       return cachep;
+}
+
+static inline void memcg_kmem_put_cache(struct kmem_cache *cachep)
+{
+}

 static inline int memcg_kmem_charge(struct page *page, gfp_t gfp, int order)
 {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ