core: remove io_mem attachments before destruction

The attachment removal is triggered actually on _ds member destruction time,
but after the io_mem representation for the specific base-<platform> possibly
vanished already during _unmap_local in the ~Io_mem_dataspace. This creates
on base-sel4 several kernel warnings about invalid capabilities.

Issue #4913
This commit is contained in:
Alexander Boettcher 2023-05-30 16:40:54 +02:00 committed by Norman Feske
parent b349dd9c0a
commit 11764ed755

View File

@ -83,6 +83,9 @@ Io_mem_session_component::Io_mem_session_component(Range_allocator &io_mem_alloc
Io_mem_session_component::~Io_mem_session_component()
{
/* remove all users of the to be destroyed io mem dataspace */
_ds.detach_from_rm_sessions();
/* dissolve IO_MEM dataspace from service entry point */
_ds_ep.dissolve(&_ds);