mm/slab.h: fix argument order in cache_from_obj's error message
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 4 Sep 2015 22:45:57 +0000 (15:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Sep 2015 23:54:41 +0000 (16:54 -0700)
While debugging a networking issue, I hit a condition that triggered an
object to be freed into the wrong kmem cache, and thus triggered the
warning in cache_from_obj().

The arguments in the error message are in wrong order: the location
of the object's kmem cache is in cachep, not s.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slab.h

index 88b55497738cb8df5cbc8e73ada9039b06553110..a3a967d7d7c27f1fec35acdfb3e07eb6f33f6fc3 100644 (file)
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -330,7 +330,7 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x)
                return cachep;
 
        pr_err("%s: Wrong slab cache. %s but object is from %s\n",
-              __func__, cachep->name, s->name);
+              __func__, s->name, cachep->name);
        WARN_ON_ONCE(1);
        return s;
 }
This page took 0.026961 seconds and 5 git commands to generate.