patch-2.3.99-pre3 linux/mm/vmalloc.c
Next file: linux/mm/vmscan.c
Previous file: linux/mm/page_alloc.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
Tue Mar 21 11:01:25 2000
- Orig file:
v2.3.99-pre2/linux/mm/vmalloc.c
- Orig date:
Tue Nov 23 22:42:21 1999
diff -u --recursive --new-file v2.3.99-pre2/linux/mm/vmalloc.c linux/mm/vmalloc.c
@@ -39,7 +39,8 @@
continue;
if (pte_present(page)) {
unsigned long map_nr = pte_pagenr(page);
- if (map_nr < max_mapnr)
+ if ((map_nr < max_mapnr) &&
+ (!PageReserved(mem_map + map_nr)))
__free_page(mem_map + map_nr);
continue;
}
@@ -206,7 +207,7 @@
struct vm_struct *area;
size = PAGE_ALIGN(size);
- if (!size || (size >> PAGE_SHIFT) > max_mapnr) {
+ if (!size || (size >> PAGE_SHIFT) > num_physpages) {
BUG();
return NULL;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)