aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/net_namespace.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2018-02-24 21:20:33 +0300
committerDavid S. Miller <davem@davemloft.net>2018-02-26 15:11:48 -0500
commit08009a760213cf6125af9453a51203f4ae108ba1 (patch)
treebcd9f2638df9b6d25f09eccc48b81ec1bee995a5 /net/core/net_namespace.c
parentMerge branch 'sonic-ethernet-cleanups' (diff)
downloadlinux-dev-08009a760213cf6125af9453a51203f4ae108ba1.tar.xz
linux-dev-08009a760213cf6125af9453a51203f4ae108ba1.zip
net: make kmem caches as __ro_after_init
All kmem caches aren't reallocated once set up. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/net_namespace.c')
-rw-r--r--net/core/net_namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 27a55236ad64..690e78c6af45 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -362,7 +362,7 @@ static void dec_net_namespaces(struct ucounts *ucounts)
dec_ucount(ucounts, UCOUNT_NET_NAMESPACES);
}
-static struct kmem_cache *net_cachep;
+static struct kmem_cache *net_cachep __ro_after_init;
static struct workqueue_struct *netns_wq;
static struct net *net_alloc(void)