aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-29 14:36:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-29 14:36:52 -0400
commit90f1e7481eebfd47e7dbf7c8c0cbfe31e025e031 (patch)
tree5c968e99d6f3f9ef756b9d399b5f9e8669ed4f5a /arch/x86
parentd6ae0c63f09cc443aa14f8b966aa3e7b2229360b (diff)
parente240ae4aad9c5c0da189cb6c956cca58abd428d0 (diff)
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
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/xen/p2m.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index 215a3ce61068..141eb0de8b06 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -497,7 +497,7 @@ static bool alloc_p2m(unsigned long pfn)
497 return true; 497 return true;
498} 498}
499 499
500bool __early_alloc_p2m(unsigned long pfn) 500static bool __init __early_alloc_p2m(unsigned long pfn)
501{ 501{
502 unsigned topidx, mididx, idx; 502 unsigned topidx, mididx, idx;
503 503
@@ -530,7 +530,7 @@ bool __early_alloc_p2m(unsigned long pfn)
530 } 530 }
531 return idx != 0; 531 return idx != 0;
532} 532}
533unsigned long set_phys_range_identity(unsigned long pfn_s, 533unsigned long __init set_phys_range_identity(unsigned long pfn_s,
534 unsigned long pfn_e) 534 unsigned long pfn_e)
535{ 535{
536 unsigned long pfn; 536 unsigned long pfn;
@@ -671,7 +671,9 @@ int m2p_add_override(unsigned long mfn, struct page *page)
671 page->private = mfn; 671 page->private = mfn;
672 page->index = pfn_to_mfn(pfn); 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 if (!PageHighMem(page)) 677 if (!PageHighMem(page))
676 /* Just zap old mapping for now */ 678 /* Just zap old mapping for now */
677 pte_clear(&init_mm, address, ptep); 679 pte_clear(&init_mm, address, ptep);
@@ -709,7 +711,7 @@ int m2p_remove_override(struct page *page)
709 spin_lock_irqsave(&m2p_override_lock, flags); 711 spin_lock_irqsave(&m2p_override_lock, flags);
710 list_del(&page->lru); 712 list_del(&page->lru);
711 spin_unlock_irqrestore(&m2p_override_lock, flags); 713 spin_unlock_irqrestore(&m2p_override_lock, flags);
712 __set_phys_to_machine(pfn, page->index); 714 set_phys_to_machine(pfn, page->index);
713 715
714 if (!PageHighMem(page)) 716 if (!PageHighMem(page))
715 set_pte_at(&init_mm, address, ptep, 717 set_pte_at(&init_mm, address, ptep,