[PATCH] i386/x86-64: Fix ioremap off by one
From Terence Ripperda <tripperda@nvidia.com> When doing iounmap don't try to change_page_attr back the guard page that ioremap added. Since the last round of change_page_attr changes this would trigger an BUG because the reference count on the changed pages wouldn't match up. The problem would be only visible on machines with >3GB of memory, because only then the PCI memory hole is below end_pfn and change_page_attr is used. Fixed for both i386 and x86-64. This was actually discovered&fixed by Andrea earlier, but I goofed up while doing the last ioremap fixes merge and this change got lost. Poor Terence had to debug it again. Sorry about that. cc: andrea@suse.de Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment