mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-19 03:06:39 +00:00
base-foc: fix 'Genode::parent_cap()'
Replacing the local name of a capability index object which exists in the capability map can destroy the AVL tree order of the capability map. With this patch the outdated object gets removed from the map and a new object gets inserted afterwards. Fixes #435.
This commit is contained in:
parent
5a88e106df
commit
8b09418e56
@ -32,8 +32,10 @@ namespace Genode {
|
||||
* Update local name after a parent capability got reloaded via
|
||||
* 'Platform_env::reload_parent_cap()'.
|
||||
*/
|
||||
if (i->id() != raw->local_name)
|
||||
i->id(raw->local_name);
|
||||
if (i->id() != raw->local_name) {
|
||||
cap_map()->remove(i);
|
||||
i = cap_map()->insert(raw->local_name, Fiasco::PARENT_CAP);
|
||||
}
|
||||
|
||||
return reinterpret_cap_cast<Parent>(Native_capability(i));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user