maltalinux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: malta

To: maltalinux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: malta
From: chris@linux-mips.org
Date: Thu, 28 Jul 2005 18:24:55 +0100
Reply-to: linux-mips@linux-mips.org
Sender: maltalinux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    malta
Changes by:     chris@ftp.linux-mips.org        05/07/28 18:24:53

Modified files:
        linux/arch/mips/lib-32: Tag: MaltaRef_2_6 dump_tlb.c 

Log message:
        * arch/mips/lib-32/dump_tlb.c (dump_list_process): Don't crash if
        t->mm is not set.

diff -urN malta/linux/arch/mips/lib-32/dump_tlb.c 
malta/linux/arch/mips/lib-32/dump_tlb.c
--- malta/linux/arch/mips/lib-32/dump_tlb.c     2005/06/21 13:24:06     
1.3.1000.1
+++ malta/linux/arch/mips/lib-32/dump_tlb.c     2005/07/28 17:24:53     
1.3.1000.2
@@ -151,41 +151,49 @@
 
        if (addr > KSEG0)
                page_dir = pgd_offset_k(0);
-       else
+       else if (t->mm) 
                page_dir = pgd_offset(t->mm, 0);
+       else
+               page_dir = NULL;
+
        printk("page_dir == %08x\n", (unsigned int) page_dir);
 
        if (addr > KSEG0)
                pgd = pgd_offset_k(addr);
-       else
+       else if (t->mm)
                pgd = pgd_offset(t->mm, addr);
+       else
+               pgd = NULL;
+
        printk("pgd == %08x, ", (unsigned int) pgd);
 
-       pud = pud_offset(pgd, addr);
-       printk("pud == %08x, ", (unsigned int) pud);
+       if (pgd) {
+               pud = pud_offset(pgd, addr);
+               printk("pud == %08x, ", (unsigned int) pud);
 
-       pmd = pmd_offset(pud, addr);
-       printk("pmd == %08x, ", (unsigned int) pmd);
+               pmd = pmd_offset(pud, addr);
+               printk("pmd == %08x, ", (unsigned int) pmd);
 
-       pte = pte_offset(pmd, addr);
-       printk("pte == %08x, ", (unsigned int) pte);
+               pte = pte_offset(pmd, addr);
+               printk("pte == %08x, ", (unsigned int) pte);
 
-       page = *pte;
+               page = *pte;
 #ifdef CONFIG_64BIT_PHYS_ADDR
-       printk("page == %08Lx\n", pte_val(page));
+               printk("page == %08Lx\n", pte_val(page));
 #else
-       printk("page == %08lx\n", pte_val(page));
+               printk("page == %08lx\n", pte_val(page));
 #endif
 
-       val = pte_val(page);
-       if (val & _PAGE_PRESENT) printk("present ");
-       if (val & _PAGE_READ) printk("read ");
-       if (val & _PAGE_WRITE) printk("write ");
-       if (val & _PAGE_ACCESSED) printk("accessed ");
-       if (val & _PAGE_MODIFIED) printk("modified ");
-       if (val & _PAGE_R4KBUG) printk("r4kbug ");
-       if (val & _PAGE_GLOBAL) printk("global ");
-       if (val & _PAGE_VALID) printk("valid ");
+               val = pte_val(page);
+               if (val & _PAGE_PRESENT) printk("present ");
+               if (val & _PAGE_READ) printk("read ");
+               if (val & _PAGE_WRITE) printk("write ");
+               if (val & _PAGE_ACCESSED) printk("accessed ");
+               if (val & _PAGE_MODIFIED) printk("modified ");
+               if (val & _PAGE_R4KBUG) printk("r4kbug ");
+               if (val & _PAGE_GLOBAL) printk("global ");
+               if (val & _PAGE_VALID) printk("valid ");
+       }
        printk("\n");
 }
 

<Prev in Thread] Current Thread [Next in Thread>