Ignore:
Timestamp:
2016-09-17T15:09:40Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ae66564
Parents:
97b8ca9
Message:

Make sure to test the present bit of the found PTE

By design, page_mapping_find() can return true and a copy of a PTE
which is not present. It is therefore necessary to test the found PTE
by PTE_PRESENT() macro.

File:
1 edited

Legend:

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

    r97b8ca9 r560b81c  
    201201        bool found = page_mapping_find(AS, istate->tpc, true, &t);
    202202        if (found && PTE_EXECUTABLE(&t)) {
     203                ASSERT(t.p);
     204
    203205                /*
    204206                 * The mapping was found in the software page hash table.
     
    256258        bool found = page_mapping_find(as, page_16k, true, &t);
    257259        if (found) {
     260                ASSERT(t.p);
     261
    258262                /*
    259263                 * The mapping was found in the software page hash table.
     
    297301        bool found = page_mapping_find(as, page_16k, true, &t);
    298302        if (found && PTE_WRITABLE(&t)) {
     303                ASSERT(t.p);
     304
    299305                /*
    300306                 * The mapping was found in the software page hash table and is
Note: See TracChangeset for help on using the changeset viewer.