[email protected]
[Top] [All Lists]

PERFORCE change 114603 for review

Subject: PERFORCE change 114603 for review
From: Oleksandr Tymoshenko
Date: Fri, 16 Feb 2007 00:34:37 GMT
http://perforce.freebsd.org/chv.cgi?CH=114603

Change 114603 by [email protected]_jeeves on 2007/02/16 00:34:11

        o Prevent pmap_remove_pte on invalid pte. This happened
            when there was no segtab for proviede va.

Affected files ...

.. //depot/projects/mips2/src/sys/mips/mips/pmap.c#20 edit

Differences ...

==== //depot/projects/mips2/src/sys/mips/mips/pmap.c#20 (text+ko) ====

@@ -228,6 +228,13 @@
 
        if (va < MIPS_KSEG0_START) {
                pte = pmap_segmap(pmap, va);
+               /* 
+                * If there is no segtab for this va return NULL 
+                * to indicate absence of mapping instead of broken 
+                * pte address.
+                */
+               if(pte == NULL)
+                       return NULL;
                pte += (va >> PAGE_SHIFT) & (NPTEPG - 1);
        } else
                pte = tlb_kern_pte_find(kptmap, va);
@@ -1017,8 +1024,12 @@
        va = sva;
        while (count--) {
                pte = pmap_pte(pmap, va);
-               pmap_remove_pte(pmap, pte, va);
-               tlb_remove(pmap, va);
+               /* NULL means there is no segtab for this area */
+               if(pte != NULL)
+               {
+                       pmap_remove_pte(pmap, pte, va);
+                       tlb_remove(pmap, va);
+               }
                va += PAGE_SIZE;
        }
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/p4-projects
To unsubscribe, send any mail to "[email protected]"

<Prev in Thread] Current Thread [Next in Thread>
  • PERFORCE change 114603 for review, Oleksandr Tymoshenko <=