From 8f42b58b53421532162eec0df611cecfc81eb96e Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Mon, 27 Feb 2012 17:42:52 +0100 Subject: [PATCH] Fiasco.OC: Fix unmap of kernel-capabilities In the cap-session component in core when freeing a capability, the corresponding kernel object should be unmapped from all processes and core. Until now, the unmap operation for removing the kernel object didn't worked because of using the wrong rights-map. This patch fixes it. The re-use of capabilities introduced by the last patch triggered this problem because its essential for the capability-registry to detect invalidated capabilities. --- base-foc/src/core/cap_session_component.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base-foc/src/core/cap_session_component.cc b/base-foc/src/core/cap_session_component.cc index e0ca25d6f..b86ba2750 100644 --- a/base-foc/src/core/cap_session_component.cc +++ b/base-foc/src/core/cap_session_component.cc @@ -118,7 +118,7 @@ void Cap_session_component::free(Native_capability cap) Capability_tree::tree()->remove(n); l4_msgtag_t tag = l4_task_unmap(L4_BASE_TASK_CAP, - l4_obj_fpage(cap.dst(), 0, 0), + l4_obj_fpage(cap.dst(), 0, L4_FPAGE_RWX), L4_FP_ALL_SPACES | L4_FP_DELETE_OBJ); if (l4_msgtag_has_error(tag)) PERR("destruction of ipc-gate %lx failed!", (unsigned long) cap.dst());