* [PATCH] xfrm: mark kmem_caches as __ro_after_init
@ 2018-02-24 18:21 Alexey Dobriyan
2018-02-28 8:40 ` Steffen Klassert
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2018-02-24 18:21 UTC (permalink / raw)
To: steffen.klassert; +Cc: herbert, davem, netdev
Kmem caches aren't relocated once set up.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
net/xfrm/xfrm_input.c | 3 ++-
net/xfrm/xfrm_policy.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
--- 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];
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -51,7 +51,7 @@ static DEFINE_SPINLOCK(xfrm_policy_afinfo_lock);
static struct xfrm_policy_afinfo const __rcu *xfrm_policy_afinfo[AF_INET6 + 1]
__read_mostly;
-static struct kmem_cache *xfrm_dst_cache __read_mostly;
+static struct kmem_cache *xfrm_dst_cache __ro_after_init;
static __read_mostly seqcount_t xfrm_policy_hash_generation;
static void xfrm_init_pmtu(struct xfrm_dst **bundle, int nr);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] xfrm: mark kmem_caches as __ro_after_init
2018-02-24 18:21 [PATCH] xfrm: mark kmem_caches as __ro_after_init Alexey Dobriyan
@ 2018-02-28 8:40 ` Steffen Klassert
0 siblings, 0 replies; 2+ messages in thread
From: Steffen Klassert @ 2018-02-28 8:40 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: herbert, davem, netdev
On Sat, Feb 24, 2018 at 09:21:38PM +0300, Alexey Dobriyan wrote:
> Kmem caches aren't relocated once set up.
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Applied to ipsec-next, thanks a lot!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-28 8:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-24 18:21 [PATCH] xfrm: mark kmem_caches as __ro_after_init Alexey Dobriyan
2018-02-28 8:40 ` Steffen Klassert
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.