diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2020-06-21 15:20:28 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2020-06-21 15:20:28 +1000 |
commit | 13dbc24db5d72b6e158ae1f59c64622c3adda66b (patch) | |
tree | b5ecf9f87d67b8c5bfc000d64e007de5824f0455 | |
parent | 6625d827c8580f13469a7ee9f8d70cce1d418175 (diff) | |
download | linux-next-13dbc24db5d72b6e158ae1f59c64622c3adda66b.tar.gz |
mm-memcg-slab-use-a-single-set-of-kmem_caches-for-all-allocations-fix
fixups for Vlastoimil's "mm, slab/slub: improve error reporting and
overhead of cache_from_obj()"
Link: http://lkml.kernel.org/r/afeda7ac-748b-33d8-a905-56b708148ad5@suse.cz
Cc: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Roman Gushchin <guro@fb.com>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Tobin C. Harding <tobin@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Waiman Long <longman@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Vijayanand Jitta <vjitta@codeaurora.org>
Cc: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
-rw-r--r-- | mm/slab.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/slab.h b/mm/slab.h index cb453bdbaeb1..0e424c30b923 100644 --- a/mm/slab.h +++ b/mm/slab.h @@ -456,12 +456,11 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x) struct kmem_cache *cachep; if (!IS_ENABLED(CONFIG_SLAB_FREELIST_HARDENED) && - !memcg_kmem_enabled() && !kmem_cache_debug_flags(s, SLAB_CONSISTENCY_CHECKS)) return s; cachep = virt_to_cache(x); - if (WARN(cachep && !slab_equal_or_root(cachep, s), + if (WARN(cachep && cachep != s, "%s: Wrong slab cache. %s but object is from %s\n", __func__, s->name, cachep->name)) print_tracking(cachep, x); |