okl4: fix return value if IPC failed

Otherwise RPC calls to dead/invalid destinations are rated as successful,
which leads to wrong execution paths later on. Triggered by bomb.run where
rm_session.attach() returned as successful with local address set to 0, which
causes un-handled page-faults later on.

Fixes #1480
devel
Alexander Boettcher 8 years ago committed by Christian Helmuth
parent eee0bf5ab2
commit 50d6d2e922

@ -193,8 +193,11 @@ void Ipc_client::_call()
((L4_ErrorCode() & ERROR_MASK) == ERROR_CANCELED))
throw Genode::Blocking_canceled();
if (L4_IpcFailed(rcv_tag))
if (L4_IpcFailed(rcv_tag)) {
kdb_emergency_print("Ipc failed\n");
/* set return value for ipc_generic part if call failed */
ret(ERR_INVALID_OBJECT);
}
/* copy request message from the UTCBs message registers */
copy_utcb_to_msgbuf(rcv_tag, _rcv_msg);

Loading…
Cancel
Save