Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Explain clearly why kmalloc() can't use __GFP_HIGHMEM.

Fix the wishy-washy comment to clearly explain why kmalloc() can't
use the __GFP_HIGHMEM zone modifier.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>

authored by

Robert P. J. Day and committed by
Adrian Bunk
8518609d 3a4fa0a2

+2 -1
+2 -1
mm/nommu.c
··· 175 175 void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot) 176 176 { 177 177 /* 178 - * kmalloc doesn't like __GFP_HIGHMEM for some reason 178 + * You can't specify __GFP_HIGHMEM with kmalloc() since kmalloc() 179 + * returns only a logical address. 179 180 */ 180 181 return kmalloc(size, (gfp_mask | __GFP_COMP) & ~__GFP_HIGHMEM); 181 182 }