Thread (8 messages) 8 messages, 3 authors, 2012-02-29

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

From: Dmitry Antipov <hidden>
Date: 2012-02-28 11:58:11
Also in: lkml

On 02/28/2012 01:44 PM, Dan Carpenter wrote:
On Tue, Feb 28, 2012 at 01:33:59PM +0400, Dmitry Antipov wrote:
quoted
  - 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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help