patch-2.4.23 linux-2.4.23/arch/m68k/mm/kmap.c
Next file: linux-2.4.23/arch/m68k/mm/memory.c
Previous file: linux-2.4.23/arch/m68k/math-emu/fp_log.c
Back to the patch index
Back to the overall index
- Lines: 21
- Date:
2003-11-28 10:26:19.000000000 -0800
- Orig file:
linux-2.4.22/arch/m68k/mm/kmap.c
- Orig date:
2001-02-09 11:29:44.000000000 -0800
diff -urN linux-2.4.22/arch/m68k/mm/kmap.c linux-2.4.23/arch/m68k/mm/kmap.c
@@ -71,7 +71,7 @@
addr = tmp->size + (unsigned long)tmp->addr;
}
area->addr = (void *)addr;
- area->size = size + IO_SIZE;
+ area->size = size + IO_SIZE; /* leave a gap between */
area->next = *p;
*p = area;
return area;
@@ -87,7 +87,10 @@
for (p = &iolist ; (tmp = *p) ; p = &tmp->next) {
if (tmp->addr == addr) {
*p = tmp->next;
- __iounmap(tmp->addr, tmp->size);
+ if ( tmp->size > IO_SIZE )
+ __iounmap(tmp->addr, tmp->size - IO_SIZE);
+ else
+ printk("free_io_area: Invalid I/O area size %lu\n", tmp->size);
kfree(tmp);
return;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)