From: Jeremy Fitzhardinge Date: Sat, 21 Jul 2007 15:11:35 +0000 (+0200) Subject: i386: fix iounmap's use of vm_struct's size field X-Git-Tag: v2.6.23-rc1~48 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9585116ba09f1d8c52d0a1346e20bb9d443e9c02;p=pandora-kernel.git 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 for debugging the problem. [ Andi, it wasn't clear to me whether x86_64 needs the same fix. ] Signed-off-by: Jeremy Fitzhardinge Cc: Dave Young Cc: Chuck Ebbert Signed-off-by: Andrew Morton Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed