diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slab.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -162,6 +162,8 @@ static inline const char *cache_name(struct kmem_cache *s) static inline struct kmem_cache *cache_from_memcg(struct kmem_cache *s, int idx) { + if (!s->memcg_params) + return NULL; return s->memcg_params->memcg_caches[idx]; } |