LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* kmalloc() with size zero
@ 2007-03-23  0:18 Stephane Eranian
  2007-03-23  1:38 ` Jan Engelhardt
  2007-03-23 15:12 ` Christoph Lameter
  0 siblings, 2 replies; 7+ messages in thread
From: Stephane Eranian @ 2007-03-23  0:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, ak

Hello,

I ran into an issue with perfmon where I ended up calling
kmalloc() with a size of zero. To my surprise, this did
not return NULL but a valid data address.

I am wondering if this is a property of kmalloc() or simply
a bug. It is the case that the __kmalloc() code does not
check for zero size.

Thanks,

-- 

-Stephane

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-03-29 14:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-23  0:18 kmalloc() with size zero Stephane Eranian
2007-03-23  1:38 ` Jan Engelhardt
2007-03-23  4:39   ` Vignesh Babu BM
2007-03-25 16:30     ` Folkert van Heusden
2007-03-26  8:09       ` Stephane Eranian
2007-03-29 14:39         ` Bill Davidsen
2007-03-23 15:12 ` Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).