[ofa-general] Re: [PATCH] OpenSM/osm_subnet.c: Fix log_max_size conversion to MB

Sasha Khapyorsky sashak at voltaire.com
Tue Nov 11 09:28:58 PST 2008


On 07:23 Tue 11 Nov     , Hal Rosenstock wrote:
> Sasha,
>
> This patch fixes the conversion of log_max_size to MB introduced by commit 
> 9954ead20c84586c6daaec5a1fba835eda0b4738
>
> It does not address the overflow issues introduced by that change though.
>
> -- Hal

> OpenSM/osm_subnet.c: Convert log_max_size to MB
> 
> Fixes commit 9954ead20c84586c6daaec5a1fba835eda0b4738
> which should preceed commit 12b0e65b2dd198c1764ffb23dd8d6572f0fac5e6
> 
> Signed-off-by: Hal Rosenstock <hal.rosenstock at gmail.com>

Nice catch. Applied. Thanks.

Sasha

> 
> diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
> index 750bdc6..5447e95 100644
> --- a/opensm/opensm/osm_subnet.c
> +++ b/opensm/opensm/osm_subnet.c
> @@ -1278,7 +1278,7 @@ int osm_subn_parse_conf_file(char *file_name, osm_subn_opt_t * const p_opts)
>  		opts_unpack_uint32("log_max_size",
>  				   p_key, p_val,
>  				   (void *) & p_opts->log_max_size);
> -		p_opts->log_max_size * 1024 *1024; /* convert to MB */
> +		p_opts->log_max_size *= 1024 * 1024; /* convert to MB */
>  
>  		opts_unpack_charp("partition_config_file",
>  				  p_key, p_val, &p_opts->partition_config_file);




More information about the general mailing list