Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=df912ea4ae7233d1504fbd861ee127bd7ee5781d
Commit:     df912ea4ae7233d1504fbd861ee127bd7ee5781d
Parent:     e66485d747505e9d960b864fc6c37f8b2afafaf0
Author:     Jeremy Fitzhardinge <[EMAIL PROTECTED]>
AuthorDate: Tue Sep 25 11:50:00 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Sep 26 09:27:14 2007 -0700

    xen: execve's error paths don't pin the mm before unpinning
    
    execve's error paths don't activate (and therefore pin) the mm before
    calling exit_mmap to free it up, so don't try to unpin unless it is
    actually pinned.  This prevents a BUG_ON from triggering.
    
    Signed-off-by: Jeremy Fitzhardinge <[EMAIL PROTECTED]>
    Cc: Christian Ostheimer <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/i386/xen/mmu.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/i386/xen/mmu.c b/arch/i386/xen/mmu.c
index 4ae038a..874db0c 100644
--- a/arch/i386/xen/mmu.c
+++ b/arch/i386/xen/mmu.c
@@ -559,6 +559,9 @@ void xen_exit_mmap(struct mm_struct *mm)
        put_cpu();
 
        spin_lock(&mm->page_table_lock);
-       xen_pgd_unpin(mm->pgd);
+
+       /* pgd may not be pinned in the error exit path of execve */
+       if (PagePinned(virt_to_page(mm->pgd)))
+               xen_pgd_unpin(mm->pgd);
        spin_unlock(&mm->page_table_lock);
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to