Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'stable/bug-fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

* 'stable/bug-fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
xen: Use new irq_move functions
xen: Convert genirq namespace
xen: fix p2m section mismatches
xen/p2m: Allocate p2m tracking pages on override
xen-gntdev: unlock on error path in gntdev_mmap()
xen-gntdev: return -EFAULT on copy_to_user failure

+10 -6
+6 -4
arch/x86/xen/p2m.c
··· 497 497 return true; 498 498 } 499 499 500 - bool __early_alloc_p2m(unsigned long pfn) 500 + static bool __init __early_alloc_p2m(unsigned long pfn) 501 501 { 502 502 unsigned topidx, mididx, idx; 503 503 ··· 530 530 } 531 531 return idx != 0; 532 532 } 533 - unsigned long set_phys_range_identity(unsigned long pfn_s, 533 + unsigned long __init set_phys_range_identity(unsigned long pfn_s, 534 534 unsigned long pfn_e) 535 535 { 536 536 unsigned long pfn; ··· 671 671 page->private = mfn; 672 672 page->index = pfn_to_mfn(pfn); 673 673 674 - __set_phys_to_machine(pfn, FOREIGN_FRAME(mfn)); 674 + if (unlikely(!set_phys_to_machine(pfn, FOREIGN_FRAME(mfn)))) 675 + return -ENOMEM; 676 + 675 677 if (!PageHighMem(page)) 676 678 /* Just zap old mapping for now */ 677 679 pte_clear(&init_mm, address, ptep); ··· 711 709 spin_lock_irqsave(&m2p_override_lock, flags); 712 710 list_del(&page->lru); 713 711 spin_unlock_irqrestore(&m2p_override_lock, flags); 714 - __set_phys_to_machine(pfn, page->index); 712 + set_phys_to_machine(pfn, page->index); 715 713 716 714 if (!PageHighMem(page)) 717 715 set_pte_at(&init_mm, address, ptep,
+4 -2
drivers/xen/gntdev.c
··· 273 273 map->vma->vm_start + map->notify.addr; 274 274 err = copy_to_user(tmp, &err, 1); 275 275 if (err) 276 - return err; 276 + return -EFAULT; 277 277 map->notify.flags &= ~UNMAP_NOTIFY_CLEAR_BYTE; 278 278 } else if (pgno >= offset && pgno < offset + pages) { 279 279 uint8_t *tmp = kmap(map->pages[pgno]); ··· 662 662 if (map->flags) { 663 663 if ((vma->vm_flags & VM_WRITE) && 664 664 (map->flags & GNTMAP_readonly)) 665 - return -EINVAL; 665 + goto out_unlock_put; 666 666 } else { 667 667 map->flags = GNTMAP_host_map; 668 668 if (!(vma->vm_flags & VM_WRITE)) ··· 700 700 spin_unlock(&priv->lock); 701 701 return err; 702 702 703 + out_unlock_put: 704 + spin_unlock(&priv->lock); 703 705 out_put_map: 704 706 if (use_ptemod) 705 707 map->vma = NULL;