linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Antipov <dmitry.antipov@linaro.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Rusty Russell <rusty.russell@linaro.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linaro-dev@lists.linaro.org, patches@linaro.org
Subject: Re: [PATCH 1/2] vmalloc: use ZERO_SIZE_PTR / ZERO_OR_NULL_PTR
Date: Tue, 28 Feb 2012 15:59:25 +0400	[thread overview]
Message-ID: <4F4CC19D.9040608@linaro.org> (raw)
In-Reply-To: <20120228094415.GA2868@mwanda>

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).

Dmitry

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2012-02-28 11:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28  9:33 [PATCH 1/2] vmalloc: use ZERO_SIZE_PTR / ZERO_OR_NULL_PTR Dmitry Antipov
2012-02-28  9:34 ` [PATCH 2/2] module: use ZERO_OR_NULL_PTR allocation pointer checking Dmitry Antipov
2012-02-28  9:44 ` [PATCH 1/2] vmalloc: use ZERO_SIZE_PTR / ZERO_OR_NULL_PTR Dan Carpenter
2012-02-28 11:59   ` Dmitry Antipov [this message]
2012-02-28 13:30     ` Dan Carpenter
2012-02-29  6:53       ` Dmitry Antipov
2012-02-29  7:10         ` Dan Carpenter
2012-02-29  8:29         ` Amit Kucheria

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F4CC19D.9040608@linaro.org \
    --to=dmitry.antipov@linaro.org \
    --cc=akpm@linux-foundation.org \
    --cc=dan.carpenter@oracle.com \
    --cc=linaro-dev@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=patches@linaro.org \
    --cc=rusty.russell@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).