Whamcloud - gitweb
LU-6872 lov: avoid infinite loop in lsm_alloc_plain() 44/15644/2
authorJohn L. Hammond <john.hammond@intel.com>
Mon, 20 Jul 2015 14:24:27 +0000 (09:24 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 26 Jul 2015 05:48:58 +0000 (05:48 +0000)
In lsm_alloc_plain() use a signed loop index to avoid an infinite loop
in the error path.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I084bfadd8a6bf44bbcbe60624e31926ec6cdc04e
Reviewed-on: http://review.whamcloud.com/15644
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/lov/lov_ea.c

index 8ea8803..922322e 100644 (file)
@@ -85,7 +85,7 @@ struct lov_stripe_md *lsm_alloc_plain(u16 stripe_count)
        struct lov_oinfo     *loi;
        size_t lsm_size;
        size_t oinfo_ptrs_size;
-       unsigned int i;
+       int i;
 
        LASSERT(stripe_count <= LOV_MAX_STRIPE_COUNT);