aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borkmann <[email protected]>2015-09-04 15:45:57 -0700
committerLinus Torvalds <[email protected]>2015-09-04 16:54:41 -0700
commit2d16e0fd3265b42648d267b7adb837db9798edaf (patch)
tree2b4d6e446835797dc5dd3e1e8b0c86361cfc3231
parent45eb00cd3a034b8448f52fd9074e9b2b11d857c1 (diff)
mm/slab.h: fix argument order in cache_from_obj's error message
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 <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Pekka Enberg <[email protected]> Cc: David Rientjes <[email protected]> Cc: Joonsoo Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/slab.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slab.h b/mm/slab.h
index 88b55497738c..a3a967d7d7c2 100644
--- 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;
}