patch for iomem uses
1. linux/arch/um/kernel/physmem.c
the find_iomem function will case endless loop if you use two or more
iomem to launch the UML kernel.
diff -urN linux-2.6.10/arch/um/kernel/physmem.c linux-2.6.10-src
/arch/um/kernel/physmem.c
--- linux-2.6.10/arch/um/kernel/physmem.c 2004-12-25 05:35:01.000000000+0800
+++ linux-2.6.10-src/arch/um/kernel/physmem.c 2006-02-21 13:22:
43.000000000 +0800
@@ -275,7 +275,7 @@
highmem_len = highmem_pages * sizeof(struct page);
total_pages = phys_pages + iomem_pages + highmem_pages;
- total_len = phys_len + iomem_pages + highmem_len;
+ total_len = phys_len + iomem_len + highmem_len;
if(kmalloc_ok){
map = kmalloc(total_len, GFP_KERNEL);
@@ -435,6 +435,7 @@
*len_out = region->size;
return(region->virt);
}
+ region = region->next;
}
return(0);2. /arch/um/kernel/mem_user.c
diff -urN linux-2.6.10/arch/um/kernel/mem_user.c linux-2.6.10-src /arch/um/kernel/mem_user.c
--- linux-2.6.10/arch/um/kernel/mem_user.c 2004-12-25 05:34:57.000000000+0800 +++ linux-2.6.10-src/arch/um/kernel/mem_user.c 2006-02-21 16:17:39.000000000+0800
@@ -191,7 +191,7 @@
goto out_close;
}
- size = (buf.ust_size + UM_KERN_PAGE_SIZE) & ~(UM_KERN_PAGE_SIZE - 1);
+ size = (buf.ust_size + UM_KERN_PAGE_SIZE - 1 ) & ~(UM_KERN_PAGE_SIZE - 1);
*new = ((struct iomem_region) { .next = iomem_regions,
.driver = driver,
Quoted 2 lines · wang lianwei
the
find_iomemfunction will case endless loop if you use two or more
iomem to launch the UML kernel.
These look obviously correct. Can you resend as a single, signed-off patch?
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel