kernel-hacking-2024-linux-s.../arch
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
..
alpha
arm clockevents: fix resume logic 2007-07-21 17:49:15 -07:00
arm26
avr32
blackfin
cris
frv
h8300
i386 i386: fix iounmap's use of vm_struct's size field 2007-07-21 18:37:14 -07:00
ia64 revert "PIE randomization" 2007-07-21 17:49:14 -07:00
m32r
m68k m68k: exclude more unbuildable drivers 2007-07-20 08:24:49 -07:00
m68knommu m68knommu: reformat show_cpuinfo() 2007-07-20 08:44:20 -07:00
mips [MIPS] User stack pointer randomisation 2007-07-20 18:57:40 +01:00
parisc
powerpc spufs: make signal-notification files readonly for NOSCHED contexts 2007-07-21 17:49:16 -07:00
ppc
s390
sh clockevents: fix resume logic 2007-07-21 17:49:15 -07:00
sh64 sh64: Flag sh64_get_page() as __init_refok. 2007-07-20 17:46:42 +09:00
sparc [SPARC]: Make sure dev_archdata is filled in for all devices. 2007-07-20 17:13:42 -07:00
sparc64 NTP: move the cmos update code into ntp.c 2007-07-21 17:49:15 -07:00
um
v850
x86_64 x86_64: move iommu declaration from proto to iommu.h 2007-07-21 18:37:14 -07:00
xtensa