android_kernel_samsung_msm8976/arch/i386/mm
Jeremy Fitzhardinge 9585116ba0 i386: fix iounmap's use of vm_struct's size field
get_vm_area always returns an area with an adjacent guard page.  That guard
page is included in vm_struct.size.  iounmap uses vm_struct.size to
determine how much address space needs to have change_page_attr applied to
it, which will BUG if applied to the guard page.

This patch adds a helper function - get_vm_area_size() in linux/vmalloc.h -
to return the actual size of a vm area, and uses it to make iounmap do the
right thing.  There are probably other places which should be using
get_vm_area_size().

Thanks to Dave Young <hidave.darkstar@gmail.com> for debugging the
problem.

[ Andi, it wasn't clear to me whether x86_64 needs the same fix. ]

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Dave Young <hidave.darkstar@gmail.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-21 18:37:14 -07:00
..
boot_ioremap.c [PATCH] paravirt: Add MMU virtualization to paravirt_ops 2006-12-07 02:14:08 +01:00
discontig.c x86: Fix discontigmem + non-HIGHMEM compile 2007-05-15 18:45:49 -07:00
extable.c [PATCH] i386: Allow a kernel not to be in ring 0 2006-09-26 10:52:39 +02:00
fault.c mm: fault feedback #2 2007-07-19 10:04:41 -07:00
highmem.c [PATCH] i386: PARAVIRT: flush lazy mmu updates on kunmap_atomic 2007-05-02 19:27:15 +02:00
hugetlbpage.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
init.c i386: minor nx handling adjustment 2007-07-21 18:37:09 -07:00
ioremap.c i386: fix iounmap's use of vm_struct's size field 2007-07-21 18:37:14 -07:00
Makefile [PATCH] sparsemem memory model for i386 2005-06-23 09:45:05 -07:00
mmap.c Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
pageattr.c x86: Always flush pages in change_page_attr 2007-07-21 18:37:07 -07:00
pgtable.c i386: pgd_{c,d}tor() static 2007-07-21 18:37:12 -07:00