From 72f2ea349d56e2ee12199e52c340e6d6f3c99586 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 10 Nov 2017 15:10:01 +0100 Subject: [PATCH] init: forward RAM/cap quota session errors This patch supplements init's service-forwarding mechanism to propagate the insufficient RAM/cap quota conditions from the server to the client. Without it, the client's session request stays pending infinitely. --- repos/os/src/init/server.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/repos/os/src/init/server.cc b/repos/os/src/init/server.cc index 0af8649f1a..7995d74586 100644 --- a/repos/os/src/init/server.cc +++ b/repos/os/src/init/server.cc @@ -145,6 +145,12 @@ void Init::Server::session_ready(Session_state &session) if (session.phase == Session_state::SERVICE_DENIED) _close_session(session, Parent::SERVICE_DENIED); + + if (session.phase == Session_state::INSUFFICIENT_RAM_QUOTA) + _close_session(session, Parent::INSUFFICIENT_RAM_QUOTA); + + if (session.phase == Session_state::INSUFFICIENT_CAP_QUOTA) + _close_session(session, Parent::INSUFFICIENT_CAP_QUOTA); }