Changeset c867756e in mainline


Ignore:
Timestamp:
2008-09-08T21:00:30Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e40e3007
Parents:
91befde0
Message:

Write protection fault should not panic the mips32 kernel if it happens during
copy_to_uspace().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/mm/tlb.c

    r91befde0 rc867756e  
    288288
    289289        /*
    290          * Fail if the page is not writable.
    291          */
    292         if (!pte->w)
    293                 goto fail;
    294 
    295         /*
    296290         * Read the faulting TLB entry.
    297291         */
     
    403397         */     
    404398        pte = page_mapping_find(AS, badvaddr);
    405         if (pte && pte->p) {
     399        if (pte && pte->p && (pte->w || access != PF_ACCESS_WRITE)) {
    406400                /*
    407401                 * Mapping found in page tables.
     
    426420                        pte = page_mapping_find(AS, badvaddr);
    427421                        ASSERT(pte && pte->p);
     422                        ASSERT(pte->w || access != PF_ACCESS_WRITE);
    428423                        return pte;
    429424                        break;
Note: See TracChangeset for help on using the changeset viewer.