From fd3c70ec5b697738731ea0c30236784c596dc95c Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 16 Dec 2022 11:59:58 +0100 Subject: [PATCH] hw: mark threads as dead in case of ipc violations The IPC protcol violations are: * Sending to an unknown thread (cap) * Waiting for messages if a reply hasn't happened yet This silents threads that otherwise repeatedly cause kernel messages about the violation. Ref genodelabs/genode#4704 --- repos/base-hw/src/core/kernel/thread.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/base-hw/src/core/kernel/thread.cc b/repos/base-hw/src/core/kernel/thread.cc index 8feb09c4ce..9a46bd1b84 100644 --- a/repos/base-hw/src/core/kernel/thread.cc +++ b/repos/base-hw/src/core/kernel/thread.cc @@ -488,7 +488,7 @@ void Thread::_call_await_request_msg() } } else { Genode::raw("IPC await request: bad state"); - user_arg_0(0); + _become_inactive(DEAD); } } @@ -533,7 +533,7 @@ void Thread::_call_send_request_msg() if (!dst) { Genode::raw(*this, ": cannot send to unknown recipient ", (unsigned)user_arg_1()); - _become_inactive(AWAITS_IPC); + _become_inactive(DEAD); return; } bool const help = Cpu_job::_helping_possible(*dst);