1
1

There were corner cases that allowed max_reg to be uninitialized. Set

a default value so that those corner cases would still have an
initialized value in max_reg.
Этот коммит содержится в:
Jeff Squyres 2015-04-28 14:34:05 -07:00
родитель 6ab91a6781
Коммит a50ad505e7

Просмотреть файл

@ -1509,6 +1509,9 @@ static uint64_t calculate_max_reg (const char *device_name)
return (max_reg * 7) >> 3;
}
/* Default to being able to register everything (to ensure that
max_reg is initialized in all cases) */
max_reg = mem_total;
if (!strncmp(device_name, "mlx5", 4)) {
max_reg = 2 * mem_total;