http://oss.sgi.com/bugzilla/show_bug.cgi?id=411
Eric Sandeen <sandeen-xfs@xxxxxxxxxxx> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sandeen-xfs@xxxxxxxxxxx
--- Comment #13 from Eric Sandeen <sandeen-xfs@xxxxxxxxxxx> 2009-02-11
16:27:32 CST ---
I've seen this before:
static __always_inline void *kmalloc(size_t size, gfp_t flags)
{
if (__builtin_constant_p(size)) {
if (size > PAGE_SIZE)
return kmalloc_large(size, flags);
if (!(flags & SLUB_DMA)) {
struct kmem_cache *s = kmalloc_slab(size);
if (!s)
return ZERO_SIZE_PTR;
return kmem_cache_alloc(s, flags);
}
}
return __kmalloc(size, flags);
}
and:
/*
* ZERO_SIZE_PTR will be returned for zero sized kmalloc requests.
*
* Dereferencing ZERO_SIZE_PTR will lead to a distinct access fault.
*
* ZERO_SIZE_PTR can be passed to kfree though in the same way that NULL can.
* Both make kfree a no-op.
*/
#define ZERO_SIZE_PTR ((void *)16)
this seems ... broken?
--
Configure bugmail: http://oss.sgi.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
|