Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christoph Lameter wrote:
That is another patchset. See http://marc.info/?l=linux-kernel&w=2&r=1&s=DEVELKERNEL&q=b

Oh my, I am totally confused now.

First you fix kmalloc(0) to be legal and safe. And then you want to DEVEL_WARN_ON_ONCE when size is zero so people can fix their code?

I don't get it.

I thought we wanted to support kmalloc(0) so that as long as you don't dereference the pointer, it's all legal and good. Right? So we obviously should shut up the WARN_ON because if you do oops, you can clearly see that it happened at ZERO_SIZE_PTR and have a nice stack trace anyway...

Btw, if I am again missing something totally obvious, could you please be so kind to send me a batch of the same pills that the smart people take. I am all out.

			Pekka
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux