From c85e6eae1698cecb15d63e112e937f706280c78e Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Mon, 25 Jun 2012 15:26:06 +0200 Subject: control page: warn on page fault Page faults should not happen here. Scream if they do anyway. This is useful when extending the control page. --- litmus/ctrldev.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/litmus/ctrldev.c b/litmus/ctrldev.c index 294d134a4a6d..ec0fc4b1ab55 100644 --- a/litmus/ctrldev.c +++ b/litmus/ctrldev.c @@ -55,19 +55,19 @@ static void litmus_ctrl_vm_close(struct vm_area_struct* vma) TRACE_CUR(CTRL_NAME ": %p:%p vma:%p vma->vm_private_data:%p closed.\n", (void*) vma->vm_start, (void*) vma->vm_end, vma, - vma->vm_private_data, current->comm, - current->pid); + vma->vm_private_data); } static int litmus_ctrl_vm_fault(struct vm_area_struct* vma, struct vm_fault* vmf) { - /* This function should never be called, since - * all pages should have been mapped by mmap() - * already. */ - TRACE_CUR("%s flags=0x%x\n", __FUNCTION__, vma->vm_flags); + TRACE_CUR("%s flags=0x%x (off:%ld)\n", __FUNCTION__, + vma->vm_flags, vmf->pgoff); + + /* This function should never be called, since all pages should have + * been mapped by mmap() already. */ + WARN_ONCE(1, "Page faults should be impossible in the control page\n"); - /* nope, you only get one page */ return VM_FAULT_SIGBUS; } -- cgit v1.2.2