]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Merge branches 'stable/mmu.fixes.rebased' and 'stable/bug.fixes-3.2.rebased' into...
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 15 Nov 2011 16:10:42 +0000 (11:10 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 15 Nov 2011 16:10:42 +0000 (11:10 -0500)
* stable/mmu.fixes.rebased:
  xen-gntalloc: signedness bug in add_grefs()
  xen-gntalloc: integer overflow in gntalloc_ioctl_alloc()
  xen-gntdev: integer overflow in gntdev_alloc_map()
  xen:pvhvm: enable PVHVM VCPU placement when using more than 32 CPUs.
  xen/balloon: Avoid OOM when requesting highmem

* stable/bug.fixes-3.2.rebased:
  xen: Remove hanging references to CONFIG_XEN_PLATFORM_PCI

1  2  3 
arch/x86/xen/enlighten.c
drivers/xen/balloon.c
drivers/xen/gntdev.c

Simple merge
index d01944e871cae9e2b1d2de5e1de8ee7ea01cd0b5,7345c1da64aea2489aa0881688049c388d93416a,f54290baa3dbd84317350a41aaab720649dc1baf..1a23033a1ac5e8d040f878305dcc1d8ea6756b55
@@@@ -500,17 -374,17 -374,16 +500,17 @@@@ EXPORT_SYMBOL_GPL(balloon_set_new_targe
    * alloc_xenballooned_pages - get pages that have been ballooned out
    * @nr_pages: Number of pages to get
    * @pages: pages returned
-   * @highmem: highmem or lowmem pages
+ + * @highmem: allow highmem pages
    * @return 0 on success, error otherwise
    */
  -int alloc_xenballooned_pages(int nr_pages, struct page** pages)
  +int alloc_xenballooned_pages(int nr_pages, struct page **pages, bool highmem)
   {
        int pgno = 0;
 --     struct pagepage;
 ++     struct page *page;
        mutex_lock(&balloon_mutex);
        while (pgno < nr_pages) {
  -             page = balloon_retrieve(true);
  -             if (page) {
  +             page = balloon_retrieve(highmem);
-               if (page && PageHighMem(page) == highmem) {
+ +             if (page && (highmem || !PageHighMem(page))) {
                        pages[pgno++] = page;
                } else {
                        enum bp_state st;
index 39871326afa2ebb5905d2f6afbc922bb08826d0a,2f3c3633dfa39b5a7d4707c869e9fa3e1268a4ae,f914b26cf0c2efdfac05b8af9e6d9b8a37124dfc..afca14d9042e6cd2ae03f238143ac8188aaf35fb
@@@@ -114,11 -114,11 -113,10 +114,11 @@@@ static struct grant_map *gntdev_alloc_m
        if (NULL == add)
                return NULL;
   
- -     add->grants    = kzalloc(sizeof(add->grants[0])    * count, GFP_KERNEL);
- -     add->map_ops   = kzalloc(sizeof(add->map_ops[0])   * count, GFP_KERNEL);
- -     add->unmap_ops = kzalloc(sizeof(add->unmap_ops[0]) * count, GFP_KERNEL);
-       add->kmap_ops  = kzalloc(sizeof(add->kmap_ops[0])  * count, GFP_KERNEL);
- -     add->pages     = kzalloc(sizeof(add->pages[0])     * count, GFP_KERNEL);
+ +     add->grants    = kcalloc(count, sizeof(add->grants[0]), GFP_KERNEL);
+ +     add->map_ops   = kcalloc(count, sizeof(add->map_ops[0]), GFP_KERNEL);
+ +     add->unmap_ops = kcalloc(count, sizeof(add->unmap_ops[0]), GFP_KERNEL);
+ +     add->kmap_ops  = kcalloc(count, sizeof(add->kmap_ops[0]), GFP_KERNEL);
+ +     add->pages     = kcalloc(count, sizeof(add->pages[0]), GFP_KERNEL);
        if (NULL == add->grants    ||
            NULL == add->map_ops   ||
            NULL == add->unmap_ops ||