mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-19 03:06:39 +00:00
core: handle cap-ref-cnt overflow in create_thread
The code in Core's Cpu_session_component::create_thread might throw a capability refernce-count overflow if one creates many threads, which would kill core if not handled. Ref #2120
This commit is contained in:
parent
288c2c50ba
commit
99f18a2fe6
@ -67,8 +67,9 @@ Thread_capability Cpu_session_component::create_thread(Capability<Pd_session> pd
|
||||
};
|
||||
|
||||
try { _thread_ep->apply(pd_cap, create_thread_lambda); }
|
||||
catch (Region_map::Out_of_metadata) { throw Out_of_metadata(); }
|
||||
catch (Allocator::Out_of_memory) { throw Out_of_metadata(); }
|
||||
catch (Region_map::Out_of_metadata) { throw Out_of_metadata(); }
|
||||
catch (Allocator::Out_of_memory) { throw Out_of_metadata(); }
|
||||
catch (Native_capability::Reference_count_overflow) { throw Thread_creation_failed(); }
|
||||
|
||||
thread->session_exception_sigh(_exception_sigh);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user