Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/as.c

    r57355a40 r908bb96  
    7979#include <syscall/copy.h>
    8080#include <arch/interrupt.h>
     81#include <interrupt.h>
    8182
    8283/**
     
    13621363int as_page_fault(uintptr_t page, pf_access_t access, istate_t *istate)
    13631364{
     1365        int rc = AS_PF_FAULT;
     1366
    13641367        if (!THREAD)
    1365                 return AS_PF_FAULT;
     1368                goto page_fault;
    13661369       
    13671370        if (!AS)
    1368                 return AS_PF_FAULT;
     1371                goto page_fault;
    13691372       
    13701373        mutex_lock(&AS->lock);
     
    14221425         * Resort to the backend page fault handler.
    14231426         */
    1424         if (area->backend->page_fault(area, page, access) != AS_PF_OK) {
     1427        rc = area->backend->page_fault(area, page, access);
     1428        if (rc != AS_PF_OK) {
    14251429                page_table_unlock(AS, false);
    14261430                mutex_unlock(&area->lock);
     
    14431447                istate_set_retaddr(istate,
    14441448                    (uintptr_t) &memcpy_to_uspace_failover_address);
     1449        } else if (rc == AS_PF_SILENT) {
     1450                printf("Killing task %" PRIu64 " due to a "
     1451                    "failed late reservation request.\n", TASK->taskid);
     1452                task_kill_self(true);
    14451453        } else {
    1446                 return AS_PF_FAULT;
     1454                fault_if_from_uspace(istate, "Page fault: %p.", (void *) page);
     1455                panic_memtrap(istate, access, page, NULL);
    14471456        }
    14481457       
Note: See TracChangeset for help on using the changeset viewer.