mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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]>
This commit is contained in:
parent
45eb00cd3a
commit
2d16e0fd32
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue