All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix iounmap for non page aligned addresses
@ 2002-07-09 11:55 Andi Kleen
  2002-07-09 14:16 ` Hugh Dickins
  0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2002-07-09 11:55 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel


Hi Linus,

This fixes a problem introduced by the pageattr ioremap/unmap patches.
iounmap lost the ability to free non page aligned addresses, which
are e.g. used by the bootflag code.  This patch fixes this.

Also fix a potential off by one bug.

-Andi



--- linux-work/arch/i386/mm/ioremap.c.~2~	Tue Jun 18 02:13:09 2002
+++ linux/arch/i386/mm/ioremap.c	Fri Jun 21 14:42:23 2002
@@ -213,9 +213,9 @@
 void iounmap(void *addr)
 { 
 	struct vm_struct *p;
-	if (addr < high_memory) 
+	if (addr <= high_memory) 
 		return; 
-	p = remove_kernel_area(addr); 
+	p = remove_kernel_area(PAGE_MASK & (unsigned long) addr); 
 	if (!p) { 
 		printk("__iounmap: bad address %p\n", addr);
 		return;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-09 14:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-09 11:55 [PATCH] fix iounmap for non page aligned addresses Andi Kleen
2002-07-09 14:16 ` Hugh Dickins

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.