Re: [PATCH 1/2] vmalloc: use ZERO_SIZE_PTR / ZERO_OR_NULL_PTR

From: Dan Carpenter
Date: Tue Feb 28 2012 - 08:28:49 EST


On Tue, Feb 28, 2012 at 03:59:25PM +0400, Dmitry Antipov wrote:
> On 02/28/2012 01:44 PM, Dan Carpenter wrote:
> >On Tue, Feb 28, 2012 at 01:33:59PM +0400, Dmitry Antipov wrote:
> >> - Fix vmap() to return ZERO_SIZE_PTR if 0 pages are requested;
> >> - fix __vmalloc_node_range() to return ZERO_SIZE_PTR if 0 bytes
> >> are requested;
> >> - fix __vunmap() to check passed pointer with ZERO_OR_NULL_PTR.
> >>
> >
> >Why?
>
> 1) it was requested by the subsystem (co?)maintainer, see http://lkml.org/lkml/2012/1/27/475;
> 2) this looks to be a convenient way to trace/debug zero-size allocation errors (although
> I don't advocate it as a best way).

Could you include that in the changelog when the final version is
ready?

regards,
dan carpenter

Attachment: signature.asc
Description: Digital signature