The patch titled Subject: mm: make vb_alloc() more foolproof has been removed from the -mm tree. Its filename was mm-make-vb_alloc-more-foolproof.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Jan Kara <jack@xxxxxxx> Subject: mm: make vb_alloc() more foolproof If someone calls vb_alloc() (or vm_map_ram() for that matter) to allocate 0 bytes (0 pages), get_order() returns BITS_PER_LONG - PAGE_CACHE_SHIFT and interesting stuff happens. So make debugging such problems easier and warn about 0-size allocation. [akpm@xxxxxxxxxxxxxxxxxxxx: use WARN_ON-return-value feature] Signed-off-by: Jan Kara <jack@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/vmalloc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff -puN mm/vmalloc.c~mm-make-vb_alloc-more-foolproof mm/vmalloc.c --- a/mm/vmalloc.c~mm-make-vb_alloc-more-foolproof +++ a/mm/vmalloc.c @@ -904,6 +904,14 @@ static void *vb_alloc(unsigned long size BUG_ON(size & ~PAGE_MASK); BUG_ON(size > PAGE_SIZE*VMAP_MAX_ALLOC); + if (WARN_ON(size == 0)) { + /* + * Allocating 0 bytes isn't what caller wants since + * get_order(0) returns funny result. Just warn and terminate + * early. + */ + return NULL; + } order = get_order(size); again: _ Patches currently in -mm which might be from jack@xxxxxxx are origin.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html