mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-22 16:59:03 +00:00
Remove unneeded session_size check
As accommodating the session component object is already taken care of be the root component implementation, remove the remaining redundant checks. Fixes #4521.
This commit is contained in:
committed by
Christian Helmuth
parent
d3e53b3cca
commit
0ffc55a20a
@ -1240,14 +1240,9 @@ class Usb::Root : public Genode::Root_component<Session_component>
|
||||
unsigned long dev = policy.attribute_value<unsigned long>("dev", 0);
|
||||
unsigned long class_ = policy.attribute_value<unsigned long>("class", 0);
|
||||
|
||||
/* check session quota */
|
||||
size_t session_size = max<size_t>(4096, sizeof(Session_component));
|
||||
if (ram_quota < session_size)
|
||||
throw Insufficient_ram_quota();
|
||||
|
||||
if (tx_buf_size > ram_quota - session_size) {
|
||||
if (tx_buf_size > ram_quota) {
|
||||
warning("Insufficient RAM quota, got ", ram_quota, " need ",
|
||||
tx_buf_size + session_size);
|
||||
tx_buf_size);
|
||||
throw Insufficient_ram_quota();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user