file system servers must not use null tx buffers

Fixes #1534
This commit is contained in:
Emery Hemingway 2015-05-20 10:13:31 -04:00 committed by Christian Helmuth
parent e081554731
commit 5fc8ed3e6b
7 changed files with 42 additions and 7 deletions

View File

@ -348,8 +348,8 @@ class File_system::Root : public Root_component<Session_component>
char root[ROOT_MAX_LEN];
root[0] = 0;
Session_label label(args);
try {
Session_label label(args);
Session_policy policy(label);
/*
@ -393,6 +393,11 @@ class File_system::Root : public Root_component<Session_component>
size_t tx_buf_size =
Arg_string::find_arg(args, "tx_buf_size").ulong_value(0);
if (!tx_buf_size) {
PERR("%s requested a session with a zero length transmission buffer", label.string());
throw Root::Invalid_args();
}
/*
* Check if donated ram quota suffices for session data,
* and communication buffer.

View File

@ -881,8 +881,8 @@ namespace File_system {
char root[ROOT_MAX_LEN];
root[0] = 0;
Session_label label(args);
try {
Session_label label(args);
Session_policy policy(label);
/*
@ -964,6 +964,11 @@ namespace File_system {
size_t tx_buf_size =
Arg_string::find_arg(args, "tx_buf_size").ulong_value(0);
if (!tx_buf_size) {
PERR("%s requested a session with a zero length transmission buffer", label.string());
throw Root::Invalid_args();
}
/*
* Check if donated ram quota suffices for session data,
* and communication buffer.

View File

@ -447,8 +447,8 @@ class File_system::Root : public Root_component<Session_component>
char root[ROOT_MAX_LEN];
root[0] = 0;
Session_label label(args);
try {
Session_label label(args);
Session_policy policy(label);
/*
@ -493,6 +493,11 @@ class File_system::Root : public Root_component<Session_component>
size_t tx_buf_size =
Arg_string::find_arg(args, "tx_buf_size").ulong_value(0);
if (!tx_buf_size) {
PERR("%s requested a session with a zero length transmission buffer", label.string());
throw Root::Invalid_args();
}
/*
* Check if donated ram quota suffices for session data,
* and communication buffer.

View File

@ -337,8 +337,8 @@ class File_system::Root : public Root_component<Session_component>
char root[ROOT_MAX_LEN];
root[0] = 0;
Session_label label(args);
try {
Session_label label(args);
Session_policy policy(label);
/*
@ -385,6 +385,11 @@ class File_system::Root : public Root_component<Session_component>
size_t tx_buf_size =
Arg_string::find_arg(args, "tx_buf_size").ulong_value(0);
if (!tx_buf_size) {
PERR("%s requested a session with a zero length transmission buffer", label.string());
throw Root::Invalid_args();
}
/*
* Check if donated ram quota suffices for session data,
* and communication buffer.

View File

@ -436,8 +436,8 @@ namespace File_system {
char root[ROOT_MAX_LEN];
root[0] = 0;
Session_label label(args);
try {
Session_label label(args);
Session_policy policy(label);
/*
@ -486,6 +486,11 @@ namespace File_system {
size_t tx_buf_size =
Arg_string::find_arg(args, "tx_buf_size").ulong_value(0);
if (!tx_buf_size) {
PERR("%s requested a session with a zero length transmission buffer", label.string());
throw Root::Invalid_args();
}
/*
* Check if donated ram quota suffices for session data,
* and communication buffer.

View File

@ -468,8 +468,8 @@ namespace File_system {
char root[ROOT_MAX_LEN];
root[0] = 0;
Session_label label(args);
try {
Session_label label(args);
Session_policy policy(label);
/*
@ -517,6 +517,11 @@ namespace File_system {
size_t tx_buf_size =
Arg_string::find_arg(args, "tx_buf_size").ulong_value(0);
if (!tx_buf_size) {
PERR("%s requested a session with a zero length transmission buffer", label.string());
throw Root::Invalid_args();
}
/*
* Check if donated ram quota suffices for session data,
* and communication buffer.

View File

@ -949,8 +949,8 @@ class File_system::Root : public Root_component<Session_component>
Genode::Number_of_bytes buffer_size_max = 1 * (1 << 20); /* 1 MiB */
unsigned trace_parent_levels = 0;
Session_label label(args);
try {
Session_label label(args);
Session_policy policy(label);
/*
@ -1004,6 +1004,11 @@ class File_system::Root : public Root_component<Session_component>
size_t tx_buf_size =
Arg_string::find_arg(args, "tx_buf_size").ulong_value(0);
if (!tx_buf_size) {
PERR("%s requested a session with a zero length transmission buffer", label.string());
throw Root::Invalid_args();
}
/*
* Check if donated ram quota suffices for session data,
* and communication buffer.