fs_rom: read dataspace during session request

Fix #2863
This commit is contained in:
Ehmry - 2018-06-12 15:11:02 +02:00 committed by Christian Helmuth
parent 6491ba0589
commit 8f1eecdc29
1 changed files with 10 additions and 2 deletions

View File

@ -313,6 +313,14 @@ class Fs_rom::Rom_session_component : public Rpc_object<Rom_session>
{
try { _open_watch_handle(); }
catch (Watch_failed) { }
/**
* XXX: fix for live-lock, this constructor is called when this
* component handles a sesson_requests ROM signal, and preparing
* the dataspace now will hopefully prevent any interaction with
* the parent when the dataspace RPC method is called.
*/
_try_read_dataspace(UPDATE_OR_REPLACE);
}
/**
@ -326,7 +334,7 @@ class Fs_rom::Rom_session_component : public Rpc_object<Rom_session>
/**
* Return dataspace with up-to-date content of file
*/
Rom_dataspace_capability dataspace()
Rom_dataspace_capability dataspace() override
{
using namespace File_system;
@ -341,7 +349,7 @@ class Fs_rom::Rom_session_component : public Rpc_object<Rom_session>
return static_cap_cast<Rom_dataspace>(ds);
}
void sigh(Signal_context_capability sigh)
void sigh(Signal_context_capability sigh) override
{
_sigh = sigh;