Messages in this thread | | | Date | Mon, 4 Jun 2007 15:39:08 -0700 (PDT) | From | Christoph Lameter <> | Subject | Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0) |
| |
On Mon, 4 Jun 2007, Pekka Enberg wrote:
> 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.
Sorry complex situation. Andrew wants the warnings, Linus wants the ZERO_SIZE_PTR. Not sure where we are going here.
> 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...
Well so far we agreed to keep the warnings in at least till release data and I have not heard differently yet.
> 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.
Heheheh.... Mind boogling isnt it? Patch duplicity....
Seriously: Andrew/Linus could you make up your mind which way we are going here?
I'd say lets drop the DEVELKERNEL stuff and the warnings and go with ZERO_SIZE_PTR. The DEVELKERNEL patch has the danger that subtle changes occur at release time that we have not anticipated.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |