]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] slab: fix kzalloc and kstrdup caller report for CONFIG_DEBUG_SLAB
authorPekka Enberg <penberg@cs.helsinki.fi>
Wed, 1 Feb 2006 11:05:52 +0000 (03:05 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 1 Feb 2006 16:53:18 +0000 (08:53 -0800)
commit8eea0fe3a4079eb8d4be8bfd86e8de30a5fcca93
tree3186f4fdecbda4f16558c393a05408f7d3799ad4
parent14706322033e8a01bd5dbb51761519b6948ce2d1
[PATCH] slab: fix kzalloc and kstrdup caller report for CONFIG_DEBUG_SLAB

Fix kzalloc() and kstrdup() caller report for CONFIG_DEBUG_SLAB.  We must
pass the caller to __cache_alloc() instead of directly doing
__builtin_return_address(0) there; otherwise kzalloc() and kstrdup() are
reported as the allocation site instead of the real one.

Thanks to Valdis Kletnieks for reporting the problem and Steven Rostedt for
the original idea.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/slab.h
mm/slab.c