mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 11:55:24 +00:00
base: avoid Pd_session::Invalid_session condition
By adding a sanity check for the validity of the PD session targeted by a transfer_quota operation, the corner case of an incomplete PD session of a child can no longer trigger an 'Invalid_session' exception.
This commit is contained in:
parent
17e6db431e
commit
ac0562ec18
@ -473,8 +473,13 @@ class Genode::Child : protected Rpc_object<Parent>,
|
||||
|
||||
Ram_quota const ram_quota { CONNECTION::RAM_QUOTA };
|
||||
Cap_quota const cap_quota { CONNECTION::CAP_QUOTA };
|
||||
_child._policy.ref_pd().transfer_quota(cap(ram_quota), ram_quota);
|
||||
_child._policy.ref_pd().transfer_quota(cap(cap_quota), cap_quota);
|
||||
|
||||
if (cap(ram_quota).valid())
|
||||
_child._policy.ref_pd().transfer_quota(cap(ram_quota), ram_quota);
|
||||
|
||||
if (cap(cap_quota).valid())
|
||||
_child._policy.ref_pd().transfer_quota(cap(cap_quota), cap_quota);
|
||||
|
||||
_first_request = false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user