diff options
| author | John L. Hammond <john.hammond@intel.com> | 2016-11-10 12:30:37 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-14 15:54:02 +0100 |
| commit | cf9da270497118cf14437bf56449bde7950780d9 (patch) | |
| tree | 06d17c5ebb81cc71c0f3df3dd546a465e9041049 | |
| parent | e273d54380c59eabd4e4009fcf74d070878a080b (diff) | |
staging: lustre: lov: avoid infinite loop in lsm_alloc_plain()
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>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6872
Reviewed-on: http://review.whamcloud.com/15644
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_ea.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/lov/lov_ea.c b/drivers/staging/lustre/lustre/lov/lov_ea.c index 53db1707f003..2e2abed182e5 100644 --- a/drivers/staging/lustre/lustre/lov/lov_ea.c +++ b/drivers/staging/lustre/lustre/lov/lov_ea.c @@ -81,7 +81,7 @@ struct lov_stripe_md *lsm_alloc_plain(u16 stripe_count) size_t oinfo_ptrs_size, lsm_size; struct lov_stripe_md *lsm; struct lov_oinfo *loi; - unsigned int i; + int i; LASSERT(stripe_count <= LOV_MAX_STRIPE_COUNT); |
