From 70a3bb7465840dbb47b75a26355ce314d2a772ca Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Mon, 7 Sep 2015 13:34:42 +0200 Subject: [PATCH] nova: avoid syscall on invalid signal capability Reduces kernel log message noise when running on kernel-debug branch. Additionally add a more verbose core message. Discovered during Turmvilla scenario #1552 and issue #1733. --- repos/base-nova/src/base/signal/platform.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/repos/base-nova/src/base/signal/platform.cc b/repos/base-nova/src/base/signal/platform.cc index bde4e7e8cc..a711115ffc 100644 --- a/repos/base-nova/src/base/signal/platform.cc +++ b/repos/base-nova/src/base/signal/platform.cc @@ -26,6 +26,9 @@ void Signal_transmitter::submit(unsigned cnt) Trace::Signal_submit trace_event(cnt); } + if (!_context.valid()) + return; + using namespace Nova; uint8_t res = NOVA_OK; @@ -33,5 +36,6 @@ void Signal_transmitter::submit(unsigned cnt) res = sm_ctrl(_context.local_name(), SEMAPHORE_UP); if (res != NOVA_OK) - PDBG("failed - error %u", res); + PDBG("submitting signal failed - error %u - context=0x%lx", res, + _context.local_name()); }