Bugzilla – Attachment 325743 Details for
Bug 552492
X server locks when the kernel is of xen flavour
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
[patch]
tentative fix
xen-vmalloc_32.patch (text/plain), 2.09 KB, created by
Jan Beulich
on 2009-11-05 11:52:08 UTC
(
hide
)
Description:
tentative fix
Filename:
MIME Type:
Creator:
Jan Beulich
Created:
2009-11-05 11:52:08 UTC
Size:
2.09 KB
patch
obsolete
>From: jbeulich@novell.com >Subject: guarantee 32-bit (bus-)addressability of vmalloc_32() output >Patch-mainline: non-Xen part in -mm as of 2009-10-14 > >--- head-2009-10-06.orig/mm/vmalloc.c 2009-10-07 10:42:46.000000000 +0200 >+++ head-2009-10-06/mm/vmalloc.c 2009-10-07 14:22:29.000000000 +0200 >@@ -1394,6 +1394,14 @@ static void *__vmalloc_area_node(struct > { > struct page **pages; > unsigned int nr_pages, array_size, i; >+ gfp_t nested_gfp = (gfp_mask & GFP_RECLAIM_MASK) | __GFP_ZERO; >+#ifdef CONFIG_XEN >+ gfp_t dma_mask = gfp_mask & (__GFP_DMA | __GFP_DMA32); >+ >+ BUILD_BUG_ON((__GFP_DMA | __GFP_DMA32) != (__GFP_DMA + __GFP_DMA32)); >+ if (dma_mask == (__GFP_DMA | __GFP_DMA32)) >+ gfp_mask &= ~(__GFP_DMA | __GFP_DMA32); >+#endif > > nr_pages = (area->size - PAGE_SIZE) >> PAGE_SHIFT; > array_size = (nr_pages * sizeof(struct page *)); >@@ -1401,13 +1409,11 @@ static void *__vmalloc_area_node(struct > area->nr_pages = nr_pages; > /* Please note that the recursion is strictly bounded. */ > if (array_size > PAGE_SIZE) { >- pages = __vmalloc_node(array_size, gfp_mask | __GFP_ZERO, >+ pages = __vmalloc_node(array_size, nested_gfp | __GFP_HIGHMEM, > PAGE_KERNEL, node, caller); > area->flags |= VM_VPAGES; > } else { >- pages = kmalloc_node(array_size, >- (gfp_mask & GFP_RECLAIM_MASK) | __GFP_ZERO, >- node); >+ pages = kmalloc_node(array_size, nested_gfp, node); > } > area->pages = pages; > area->caller = caller; >@@ -1431,6 +1437,16 @@ static void *__vmalloc_area_node(struct > goto fail; > } > area->pages[i] = page; >+#ifdef CONFIG_XEN >+ if (dma_mask) { >+ if (xen_limit_pages_to_max_mfn(page, 0, 32)) { >+ area->nr_pages = i + 1; >+ goto fail; >+ } >+ if (gfp_mask & __GFP_ZERO) >+ clear_highpage(page); >+ } >+#endif > } > > if (map_vm_area(area, prot, &pages)) >@@ -1587,6 +1603,8 @@ void *vmalloc_exec(unsigned long size) > #define GFP_VMALLOC32 GFP_DMA32 | GFP_KERNEL > #elif defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA) > #define GFP_VMALLOC32 GFP_DMA | GFP_KERNEL >+#elif defined(CONFIG_XEN) >+#define GFP_VMALLOC32 __GFP_DMA | __GFP_DMA32 | GFP_KERNEL > #else > #define GFP_VMALLOC32 GFP_KERNEL > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 552492
:
325501
|
325540
|
325541
|
325542
|
325668
|
325670
| 325743 |
326136
|
326137