From 4f19d4869fcef789a42f7cabc8a50c1b76983fdd Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Mon, 17 Mar 2014 01:06:44 +0100 Subject: [PATCH] hw: don't use assert in Kernel::update_region ref #1101 --- base-hw/src/core/kernel/thread.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/base-hw/src/core/kernel/thread.cc b/base-hw/src/core/kernel/thread.cc index 218688774b..e5c513e90e 100644 --- a/base-hw/src/core/kernel/thread.cc +++ b/base-hw/src/core/kernel/thread.cc @@ -615,9 +615,16 @@ void Thread::_call_update_pd() void Thread::_call_update_region() { - assert(_core()); - - /* FIXME we don't handle instruction caches by now */ + /* check permissions */ + if (!_core()) { + PWRN("not entitled to update region"); + return; + } + /* + * Flush hardware caches + * + * FIXME we don't handle instruction caches by now + */ Processor::flush_data_cache_by_virt_region((addr_t)user_arg_1(), (size_t)user_arg_2()); }