Skip to content
Snippets Groups Projects
Commit a3ae51cd authored by Morris Jette's avatar Morris Jette
Browse files

Prevent invalid bitmap offset with bad node configuration

If a node has fewer CPUs than configured and task/affinity is configured a
reference off of the end of a bitmap may result without this patch.
parent 18179d44
No related branches found
No related tags found
No related merge requests found
......@@ -634,6 +634,7 @@ static bitstr_t *_get_avail_map(launch_tasks_request_msg_t *req,
* requested */
for (t = 0; t < (*hw_threads); t++) {
uint16_t bit = new_p * (*hw_threads) + t;
bit %= conf->block_map_size;
bit_set(hw_map, bit);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment