fs_rom: read dataspace during session request

Fix #2863
This commit is contained in:
Emery Hemingway 2018-06-12 15:11:02 +02:00 committed by Christian Helmuth
parent 6491ba0589
commit 8f1eecdc29

View File

@ -313,6 +313,14 @@ class Fs_rom::Rom_session_component : public Rpc_object<Rom_session>
{ {
try { _open_watch_handle(); } try { _open_watch_handle(); }
catch (Watch_failed) { } 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 * Return dataspace with up-to-date content of file
*/ */
Rom_dataspace_capability dataspace() Rom_dataspace_capability dataspace() override
{ {
using namespace File_system; 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); return static_cap_cast<Rom_dataspace>(ds);
} }
void sigh(Signal_context_capability sigh) void sigh(Signal_context_capability sigh) override
{ {
_sigh = sigh; _sigh = sigh;