aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2012-06-25 09:26:06 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2012-07-23 06:05:40 -0400
commitc85e6eae1698cecb15d63e112e937f706280c78e (patch)
tree4330d7ffcc01d117eeebba023e1fa57d4679eef5
parentd85fc52b409dc4007ab848388c3e096eec85268d (diff)
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.
-rw-r--r--litmus/ctrldev.c14
1 files 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)
55 TRACE_CUR(CTRL_NAME 55 TRACE_CUR(CTRL_NAME
56 ": %p:%p vma:%p vma->vm_private_data:%p closed.\n", 56 ": %p:%p vma:%p vma->vm_private_data:%p closed.\n",
57 (void*) vma->vm_start, (void*) vma->vm_end, vma, 57 (void*) vma->vm_start, (void*) vma->vm_end, vma,
58 vma->vm_private_data, current->comm, 58 vma->vm_private_data);
59 current->pid);
60} 59}
61 60
62static int litmus_ctrl_vm_fault(struct vm_area_struct* vma, 61static int litmus_ctrl_vm_fault(struct vm_area_struct* vma,
63 struct vm_fault* vmf) 62 struct vm_fault* vmf)
64{ 63{
65 /* This function should never be called, since 64 TRACE_CUR("%s flags=0x%x (off:%ld)\n", __FUNCTION__,
66 * all pages should have been mapped by mmap() 65 vma->vm_flags, vmf->pgoff);
67 * already. */ 66
68 TRACE_CUR("%s flags=0x%x\n", __FUNCTION__, vma->vm_flags); 67 /* This function should never be called, since all pages should have
68 * been mapped by mmap() already. */
69 WARN_ONCE(1, "Page faults should be impossible in the control page\n");
69 70
70 /* nope, you only get one page */
71 return VM_FAULT_SIGBUS; 71 return VM_FAULT_SIGBUS;
72} 72}
73 73