* [uml-devel] patch for iomem uses
@ 2006-03-06 3:25 wang lianwei
2006-03-06 3:53 ` Jeff Dike
0 siblings, 1 reply; 2+ messages in thread
From: wang lianwei @ 2006-03-06 3:25 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: jdike
[-- Attachment #1: Type: text/plain, Size: 1487 bytes --]
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,
[-- Attachment #2: Type: text/html, Size: 2357 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-03-06 3:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-06 3:25 [uml-devel] patch for iomem uses wang lianwei
2006-03-06 3:53 ` Jeff Dike
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.