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/sun4v/tlb.c

    r97b8ca9 r560b81c  
    215215        bool found = page_mapping_find(AS, va, true, &t);
    216216        if (found && PTE_EXECUTABLE(&t)) {
     217                ASSERT(t.p);
     218
    217219                /*
    218220                 * The mapping was found in the software page hash table.
     
    263265        bool found = page_mapping_find(as, va, true, &t);
    264266        if (found) {
     267                ASSERT(t.p);
     268
    265269                /*
    266270                 * The mapping was found in the software page hash table.
     
    299303        bool found = page_mapping_find(as, va, true, &t);
    300304        if (found && PTE_WRITABLE(&t)) {
     305                ASSERT(t.p);
     306
    301307                /*
    302308                 * The mapping was found in the software page hash table and is
Note: See TracChangeset for help on using the changeset viewer.