Eduard - Gabriel Munteanu wrote:On Tue, Aug 19, 2008 at 01:14:01PM -0500, Christoph Lameter wrote:Eduard - Gabriel Munteanu wrote:I just looked at it and it isn't a trivial change. slab_alloc() calls
void *kmem_cache_alloc(struct kmem_cache *s, gfp_t gfpflags)Could you get rid of the casts by changing the type of parameter of slab_alloc()?
{
- return slab_alloc(s, gfpflags, -1, __builtin_return_address(0));
+ return slab_alloc(s, gfpflags, -1, (void *) _RET_IP_);
}
other functions which expect a void ptr. Even if slab_alloc() were to
take an unsigned long and then cast it to a void ptr, other functions do
call slab_alloc() with void ptr arguments (so the casts would move
there).
I'd rather have this merged as it is and change things later, so that
kmemtrace gets some testing from Pekka and others.
Well maybe this patch will do it then:
Subject: slub: Use _RET_IP and use "unsigned long" for kernel text addresses
Use _RET_IP_ instead of buildint_return_address() and make slub use unsigned long
instead of void * for addresses.
Signed-off-by: Christoph Lameter <cl@xxxxxxxxxxxxxxxxxxxx>