summaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_input.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2018-02-24 19:21:38 +0100
committerSteffen Klassert <steffen.klassert@secunet.com>2018-02-27 10:46:01 +0100
commitf8c3d0dda4b09e05ad8781764cbe153815c1bf23 (patch)
tree29e6365cc83390b6025d101d3edd4eed2c5fa591 /net/xfrm/xfrm_input.c
parentesp4: remove redundant initialization of pointer esph (diff)
downloadlinux-f8c3d0dda4b09e05ad8781764cbe153815c1bf23.tar.xz
linux-f8c3d0dda4b09e05ad8781764cbe153815c1bf23.zip
xfrm: mark kmem_caches as __ro_after_init
Kmem caches aren't relocated once set up. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm/xfrm_input.c')
-rw-r--r--net/xfrm/xfrm_input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index 1472c0857975..44fc54dc013c 100644
--- a/net/xfrm/xfrm_input.c
+++ b/net/xfrm/xfrm_input.c
@@ -9,6 +9,7 @@
*/
#include <linux/bottom_half.h>
+#include <linux/cache.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/module.h>
@@ -31,7 +32,7 @@ struct xfrm_trans_cb {
#define XFRM_TRANS_SKB_CB(__skb) ((struct xfrm_trans_cb *)&((__skb)->cb[0]))
-static struct kmem_cache *secpath_cachep __read_mostly;
+static struct kmem_cache *secpath_cachep __ro_after_init;
static DEFINE_SPINLOCK(xfrm_input_afinfo_lock);
static struct xfrm_input_afinfo const __rcu *xfrm_input_afinfo[AF_INET6 + 1];