From: Daniel Borkmann Date: Fri, 4 Sep 2015 22:45:57 +0000 (-0700) Subject: mm/slab.h: fix argument order in cache_from_obj's error message X-Git-Tag: v4.3~282^2~48 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d16e0fd3265b42648d267b7adb837db9798edaf;p=platform%2Fkernel%2Flinux-amlogic.git 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 Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/slab.h b/mm/slab.h index 88b5549..a3a967d 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; }