diff options
Diffstat (limited to 'mm/vmalloc.c')
| -rw-r--r-- | mm/vmalloc.c | 4 | 
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 3231bf33287..27be2f0d4cb 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1290,7 +1290,7 @@ static struct vm_struct *__get_vm_area_node(unsigned long size,  		unsigned long align, unsigned long flags, unsigned long start,  		unsigned long end, int node, gfp_t gfp_mask, void *caller)  { -	static struct vmap_area *va; +	struct vmap_area *va;  	struct vm_struct *area;  	BUG_ON(in_interrupt()); @@ -1633,6 +1633,8 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,  		goto fail;  	addr = __vmalloc_area_node(area, gfp_mask, prot, node, caller); +	if (!addr) +		return NULL;  	/*  	 * In this function, newly allocated vm_struct is not added  |