is_vmalloc_addr(): Check if an address is within the vmalloc boundaries
Checking if an address is a vmalloc address is done in a couple of places. Define a common version in mm.h and replace the other checks. Again the include structures suck. The definition of VMALLOC_START and VMALLOC_END is not available in vmalloc.h since highmem.c cannot be included there. Signed-off-by: Christoph Lameter <clameter@sgi.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
0b7a96114b
commit
9e2779fa28
+1
-1
@@ -325,7 +325,7 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
|
||||
if (m == NULL) {
|
||||
if (clear_user(buffer, tsz))
|
||||
return -EFAULT;
|
||||
} else if ((start >= VMALLOC_START) && (start < VMALLOC_END)) {
|
||||
} else if (is_vmalloc_addr((void *)start)) {
|
||||
char * elf_buf;
|
||||
struct vm_struct *m;
|
||||
unsigned long curstart = start;
|
||||
|
||||
Reference in New Issue
Block a user