diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2015-09-04 18:45:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-04 19:54:41 -0400 |
commit | 2d16e0fd3265b42648d267b7adb837db9798edaf (patch) | |
tree | 2b4d6e446835797dc5dd3e1e8b0c86361cfc3231 /mm/slab.h | |
parent | 45eb00cd3a034b8448f52fd9074e9b2b11d857c1 (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 <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>
Diffstat (limited to 'mm/slab.h')
-rw-r--r-- | mm/slab.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -330,7 +330,7 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x) | |||
330 | return cachep; | 330 | return cachep; |
331 | 331 | ||
332 | pr_err("%s: Wrong slab cache. %s but object is from %s\n", | 332 | pr_err("%s: Wrong slab cache. %s but object is from %s\n", |
333 | __func__, cachep->name, s->name); | 333 | __func__, s->name, cachep->name); |
334 | WARN_ON_ONCE(1); | 334 | WARN_ON_ONCE(1); |
335 | return s; | 335 | return s; |
336 | } | 336 | } |