[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] direct_remap_pfn_range vm_flags fix
direct_remap_pfn_range() does not properly mark vma with VM_PFNMAP. This triggers improper reference counting on what rmap thought was a normal page, and a subsequent BUG() such as: Eeek! page_mapcount(page) went negative! (-1) page->flags = 414 page->count = 1 page->mapping = 00000000 ------------[ cut here ]------------ kernel BUG at /home/chrisw/hg/xen/xen-unstable/linux-2.6.16-rc2-xen0/mm/rmap.c:555! Signed-off-by: Chris Wright <chrisw@xxxxxxxxxxxx> --- diff -r 859c8d66b203 linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c --- a/linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c Tue Feb 7 20:46:13 2006 +++ b/linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c Tue Feb 7 23:46:21 2006 @@ -120,7 +120,7 @@ domid_t domid) { /* Same as remap_pfn_range(). */ - vma->vm_flags |= VM_IO | VM_RESERVED; + vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP; return __direct_remap_pfn_range( vma->vm_mm, address, mfn, size, prot, domid); _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |