[stgt] [PATCH] util.h: correct range check of str_to_int_gt() and str_to_int_lt()

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Tue Dec 10 07:17:21 CET 2013


On Tue, 10 Dec 2013 13:49:47 +0900
Ryusuke Konishi <konishi.ryusuke at lab.ntt.co.jp> wrote:

> The range checks of str_to_int_gt() and str_to_int_lt() are not
> implemented literally.  The current definitions fail to reject a
> marginal value.
> 
> Due to this difference, tgtd accepts option "-t 0" without an error,
> which overrides nr_iothreads to 0 and causes clients to hang.
> 
> This corrects str_to_int_gt()/str_to_int_lt() and prevents the issue.
> 
> Signed-off-by: Ryusuke Konishi <konishi.ryusuke at lab.ntt.co.jp>
> ---
>  usr/util.h |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Nice catch, thanks!
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list