From 39e6dd3d25032df09602ceb7b8e150e0e920c9b8 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 2 Jul 2018 11:53:18 +0200 Subject: [PATCH] core: destruction order of PD session members This patch addresses a corner case revealed by the resource_request test on seL4 after changing the child-destruction handling with commit "base: close PD on 'close_all_sessions'". During the destruction of the PD session, the backing store (session-local RAM dataspace factory) of the signal broker's slab was destroyed before destructing the signal broker. Instantiating the signal broker after the RAM dataspace factory fixes the destruction order. --- repos/base/src/core/include/pd_session_component.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/base/src/core/include/pd_session_component.h b/repos/base/src/core/include/pd_session_component.h index daa2a0afa8..8c6e25943b 100644 --- a/repos/base/src/core/include/pd_session_component.h +++ b/repos/base/src/core/include/pd_session_component.h @@ -51,8 +51,8 @@ class Genode::Pd_session_component : public Session_object Constrained_core_ram _constrained_core_ram_alloc; Sliced_heap _sliced_heap; Capability _parent { }; - Signal_broker _signal_broker; Ram_dataspace_factory _ram_ds_factory; + Signal_broker _signal_broker; Rpc_cap_factory _rpc_cap_factory; Native_pd_component _native_pd; @@ -133,9 +133,9 @@ class Genode::Pd_session_component : public Session_object _constrained_md_ram_alloc(*this, _ram_quota_guard(), _cap_quota_guard()), _constrained_core_ram_alloc(_ram_quota_guard(), _cap_quota_guard(), core_mem), _sliced_heap(_constrained_md_ram_alloc, local_rm), - _signal_broker(_sliced_heap, signal_ep, signal_ep), _ram_ds_factory(ep, phys_alloc, phys_range, local_rm, _constrained_core_ram_alloc), + _signal_broker(_sliced_heap, signal_ep, signal_ep), _rpc_cap_factory(_sliced_heap), _native_pd(*this, args), _address_space(ep, _sliced_heap, pager_ep,